Message 1 of 4
Nest a FamilyInstance inside another FamilyInstance

Not applicable
10-29-2013
08:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
Is there a way to nest a FamilyInstance inside an existing FamilyInstance?
I am aware that this blog post describes something similar to what I am talking about but it actually only nests a FamilyInstance inside another when the project is a Family Project and not when its Construction, Architectural, MEP, etc. When you run the example code in an Architectural project, the 2 FamilyInstances are separate and not nested.
What I would like to do is take 2 existing FamilyInstance and insert 1 inside the other.
My code below attempts to nest a FamilyInstance inside another by adding it as a Sub-Component. The code compiles but it fails at runtime. I believe because SubComponents is deprecated.
FamilyInstance a = InsertFamilySymbolFromRfa("C:\\Line_Segment.rfa", doc); FamilyInstance b = InsertFamilySymbolFromRfa("C:\\Point_Segment_3D.rfa", doc); a.SubComponents.Insert(b);