Skip to content

Commit

Permalink
Update modelchecker_check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcouffin committed Sep 8, 2023
1 parent 04e645e commit 1e91918
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions extensions/pyRevitTools.extension/checks/modelchecker_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import datetime

from pyrevit import coreutils
from pyrevit import script
from pyrevit import revit, DB

from pyrevit.preflight import PreflightTestCase
from pyrevit.compat import safe_strtype


# webpage with explanations of bad practices in revit maybe it could be configurable in the future?
WIKI_ARTICLE = "https://www.modelical.com/en/gdocs/revit-arc-best-practices/"


# LISTS
# COLORS for chart.js graphs - chartCategories.randomize_colors() sometimes
# creates COLORS which are not distunguishable or visible
Expand Down Expand Up @@ -1154,7 +1150,6 @@ def DocPhases(doc, links = []):
print("\n\n\n\n")

# elements by workset graph
worksetIds = []
worksetNames = []
graphWorksetsData = []

Expand All @@ -1169,9 +1164,11 @@ def DocPhases(doc, links = []):
worksetKind = str(worksetTable.GetWorkset(worksetId).Kind)
if worksetKind == "UserWorkset":
worksetName = worksetTable.GetWorkset(worksetId).Name
if worksetName not in worksetNames:
worksetNames.append(worksetName)
graphWorksetsData.append(worksetName)
if element.Name not in ('DefaultLocation', '', None) or element.Category.Name not in ('', None):
# Removes the location objects from the list as well as empty elements or proxies
if worksetName not in worksetNames:
worksetNames.append(worksetName)
graphWorksetsData.append(worksetName)
# print worksetNames
# sorting results in chart legend
worksetNames.sort()
Expand Down

0 comments on commit 1e91918

Please sign in to comment.