Created
March 24, 2020 22:34
-
-
Save johnpierson/351c9d398b8bce2a2b9181540f784b5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import * | |
from Autodesk.Revit.DB.Structure import * | |
clr.AddReference('RevitServices') | |
import RevitServices | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager | |
doc = DocumentManager.Instance.CurrentDBDocument | |
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument | |
# toggle to refresh | |
refresh = UnwrapElement(IN[0]) | |
# collect all non view template views | |
nonTemplateViews = filter(lambda v: not v.IsTemplate,FilteredElementCollector(doc).OfClass(View)) | |
# 1. convert the view name to lowercase with no spaces | |
# 2. combine all the view names into one big 'ol string | |
bigOlFreakingName = "".join(map(lambda v: v.Name.Replace(" ","").lower(),nonTemplateViews)) | |
# output the big ol string | |
OUT = bigOlFreakingName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment