GetSubComponentIds does not return all nested elements

GetSubComponentIds does not return all nested elements

dchemanov
Participant Participant
364 Views
3 Replies
Message 1 of 4

GetSubComponentIds does not return all nested elements

dchemanov
Participant
Participant

Hello, I have complex pipe fitting (please see file attached). When I call 

 

 

GetSubComponentIds

 

 

I receive only one element, but I can't figure out why.

dchemanov_0-1681102950495.png

Thanks in advance!

Accepted solutions (1)
365 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni
Accepted solution

Happy Easter!

  

Your image looks like two separate fittings to me. I don't see any reason why one would expect them to be nested.

  

Furthermore, I believe there is a significant difference between subcomponents and nested components.

  

I don't see these two fittings being subcomponents of each other either, though.

  

If you look at them with RevitLookup, what do you see? I would assume that you see two separate family instances.

  

I.e., no nesting, no subcomponent.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 4

dchemanov
Participant
Participant

dchemanov_0-1681114301386.png

It's a single family instance, and for this instance I get only one family instance id when I call GetSubComponentIds.

0 Likes
Message 4 of 4

jeremy_tammik
Alumni
Alumni

Well, then I suggest that you open the family definition RFA document and explore its internal structure there. You can do so manually or programmatically using EditFamily:

  

https://www.revitapidocs.com/2023/56e636ee-5008-0ee5-9d6c-5f622dedfbcb.htm

  

You may also be able to navigate into it using RevitLookup via the Revit application list of documents.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open