Created
March 8, 2018 12:12
-
-
Save alvpickmans/3f96e059ac8316f0d6437c979ec79701 to your computer and use it in GitHub Desktop.
Dynamo Python Script to retrieve all visible elements on a view.
This file contains 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
# To be pasted in a Dynamo Python Script node. | |
import clr | |
clr.AddReference('ProtoGeometry') | |
from Autodesk.DesignScript.Geometry import * | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import * | |
clr.AddReference("RevitServices") | |
import RevitServices | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager | |
doc = DocumentManager.Instance.CurrentDBDocument | |
view = UnwrapElement(IN[0]) | |
OUT = FilteredElementCollector(doc, view.Id).ToElements() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment