Skip to content

Commit

Permalink
Modelchecker extra function (#1257)
Browse files Browse the repository at this point in the history
* fixed host adder and added 2020.2.3

* added 2020.1.1 to hosts

* Kept on going with french translations of pyRevit buttons and tooltips

* Update modelchecker_check.py

added analytical model elements check

Co-authored-by: Ehsan Iran-Nejad <[email protected]>
  • Loading branch information
jmcouffin and eirannejad authored Jun 21, 2021
1 parent 4e949af commit 60bf447
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion extensions/pyRevitTools.extension/checks/modelchecker_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,19 @@ def checkModel(doc, output):
.GetElementCount()
)

# Analytical model activated elements
activated_analytical_model_elements_count = 0

param = DB.BuiltInParameter.STRUCTURAL_ANALYTICAL_MODEL
provider = DB.ParameterValueProvider( DB.ElementId( param ) )
evaluator = DB.FilterNumericEquals()
rule = DB.FilterIntegerRule( provider, evaluator, 1 )
filter = DB.ElementParameterFilter( rule )

analyticalCollector = DB.FilteredElementCollector( doc ).WherePasses( filter ).ToElements()

activated_analytical_model_elements_count = str(len(analyticalCollector))

# detail groups
detailGroupCount = (
DB.FilteredElementCollector(doc)
Expand Down Expand Up @@ -700,6 +713,8 @@ def DocPhases(doc, links = []):
rampTres = 0
# Architectural columns
archTres = 0
# Analytical model activated elements
activated_analytical_model_elements_count_tres = 0
# Groups
detailGroupTypeTres = 30
detailGroupTres = 500
Expand Down Expand Up @@ -1027,6 +1042,11 @@ def DocPhases(doc, links = []):
"Architecural <br>Columns",
archTres
)
+ dashboardRectMaker(
activated_analytical_model_elements_count,
"elements with analytical model activated",
activated_analytical_model_elements_count_tres
)
)
dashboardLeftMaker(htmlRowTextNotes)

Expand Down Expand Up @@ -1199,7 +1219,7 @@ class ModelChecker(PreflightTestCase):
DWGs: Imported count, linked count, dwgs in 3D count
Loadable families: count, in place family count, non parametric families count
Text notes: with factor changed count, all caps text notes count
System families: ramps count, architectural columns count
System families: ramps count, architectural columns count, elements with analytical model option enabled
Groups: detail group types count, detail group instances count, model group types count, model groups instances count
Reference planes: not named count, ref planes count
Elements count
Expand Down

0 comments on commit 60bf447

Please sign in to comment.