Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created June 13, 2020 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/c7c46632c1f0ef737ed789d9192701fb to your computer and use it in GitHub Desktop.
Save chuongmep/c7c46632c1f0ef737ed789d9192701fb to your computer and use it in GitHub Desktop.
sharedGridWorksetId=0
eleName = []
eleId= []
cats = List[BuiltInCategory]()
catNames = ['OST_CLines','OST_Grids','OST_VolumeOfInterest','OST_Levels']
for cn in catNames:
exec('cat = BuiltInCategory.'+cn)
cats.Add(cat)
filter = ElementMulticategoryFilter(cats,False)
elems = FilteredElementCollector(doc,doc.ActiveView.Id).WherePasses(filter).ToElements()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment