I have a Room Schedule which displays Rooms from Links. Using the following example, the Elements returned are the Link files, not the Rooms:
// http://thebuildingcoder.typepad.com/blog/2012/12/accessing-all-element-in-a-schedule.html // To get all elements belong to Schedule: List<Element> elementsOnSchedule = new FilteredElementCollector(doc, viewSheet.Id) .WhereElementIsNotElementType() .ToElements() .Where(e => !(e is Material)) .ToList();
There is a similar discussion here, with a suggestion to create a temporary schedule containing the Element Id:
Or viewSchedule.GetCellText() could be used to return the contents (e.g. Room Number) and then retrieve the Room Element.
Is there now a means (2017/2018) to directly return the Element from the Schedule, in this case where the Room is in a Link?
Many thanks (again), Dale
I have a Room Schedule which displays Rooms from Links. Using the following example, the Elements returned are the Link files, not the Rooms:
// http://thebuildingcoder.typepad.com/blog/2012/12/accessing-all-element-in-a-schedule.html // To get all elements belong to Schedule: List<Element> elementsOnSchedule = new FilteredElementCollector(doc, viewSheet.Id) .WhereElementIsNotElementType() .ToElements() .Where(e => !(e is Material)) .ToList();
There is a similar discussion here, with a suggestion to create a temporary schedule containing the Element Id:
Or viewSchedule.GetCellText() could be used to return the contents (e.g. Room Number) and then retrieve the Room Element.
Is there now a means (2017/2018) to directly return the Element from the Schedule, in this case where the Room is in a Link?
Many thanks (again), Dale
Dear Dale,
Thank you for your query.
I am checking with the development team for you.
I hope I'll be able to reply soon.
Best regards,
Jeremy
Dear Dale,
Thank you for your query.
I am checking with the development team for you.
I hope I'll be able to reply soon.
Best regards,
Jeremy
Dear Dale,
The development team replied:
I don't think you can do this. FilteredElementCollectors only return ids in the host and there's no explicit function to get elements in links out of a schedule.
Sorry.
Cheers,
Jeremy
Dear Dale,
The development team replied:
I don't think you can do this. FilteredElementCollectors only return ids in the host and there's no explicit function to get elements in links out of a schedule.
Sorry.
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.