Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#GetAllElementInView
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
if isinstance(IN[0],list):
views = UnwrapElement(IN[0])
else:
views = [UnwrapElement(IN[0])]
OUT = [FilteredElementCollector(doc,v.Id).ToElements() for v in views]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment