Get elements from schedule

Get elements from schedule

Extraneous
Advisor Advisor
6,025 Views
1 Reply
Message 1 of 2

Get elements from schedule

Extraneous
Advisor
Advisor

I want to get all elements that shows in ViewSchedule. Jeremy offers simple solution: FilteredElementCollector(document, ViewSchedule.Id) - because "Schedule is a View".

But this don't work! Collector return more elements that Schedule includes!

For example, document with simple "document-level macro" in attachment: 3 rebars in model, 1 rebar in schedule (filter by Mark). Macro returns 2 pcs!

2019-01-14 14_29_56-CheckRebarInSchedule - SharpDevelop.png

 

I try to get ScheduleDefinition and list of ScheduleFilters, and reproduce the filtering. But if there is a filter on the calculated value - it will not work...

It is API issue, or error in my code?

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

☮
Accepted solutions (1)
6,026 Views
1 Reply
Reply (1)
Message 2 of 2

FAIR59
Advisor
Advisor
Accepted solution

It is a API/Revit issue ( not your code).

In my answer to this question https://forums.autodesk.com/t5/revit-api-forum/quick-way-of-counting-rows-in-a-schedule/td-p/5800112 I found a workaround to get the elementId's for a given row on a Schedule. You can iterate through all the rows to get all the elements Visible in the Schedule.