Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Schedule Data - Linked Rooms

2 REPLIES 2
Reply
Message 1 of 3
Dale.Bartlett
355 Views, 2 Replies

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

Schedule Data - Linked Rooms

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.
2 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

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

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report