Message 1 of 3
Return ConduitRun Elements
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Long story short, I want to access all conduit elbows in each conduit run on a sheet so I can determine the amount of bend in each run. I can get access to the conduit runs, but I am unable to access each element (conduit) that makes up the run. I'm new to the API so maybe there' an easy solution to this. I have tried GetDependentElements and GetGeneraingElementIds but I'm unsure of he syntax to properly use those methods, or even if those are the correct methods to use. I am using pyRevit to code:
# Collect conduit runs in the selected view
conduit_runs_collector = DB.FilteredElementCollector(revit.doc).OfClass(DB.Electrical.ConduitRun)
conduit_runs = conduit_runs_collector.ToElements()
# Analyze each conduit run
for conduit_run in conduit_runs:
print(conduit_run)
total_bend_angle = 0
for element in conduit_run:
print(element)