Schedule Data - Linked Rooms

Schedule Data - Linked Rooms

Dale.Bartlett
Collaborator Collaborator
438 Views
2 Replies
Message 1 of 3

Schedule Data - Linked Rooms

Dale.Bartlett
Collaborator
Collaborator

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:

 

https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/td-p/590...

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

   




______________
Yes, I'm Satoshi.
0 Likes
439 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes