- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
How can I enter a loaded family and access elements in this loaded family? Specifically a filled region that is placed in a Title Block, I want to return this filled region's bounding box.
I have tried 'GetSubComponentIds()' and 'GetSubelements()' but both return '0'.
ISelectionFilter filter = new myFunctions.mySelectionFilter();
Reference reference = uidoc.Selection.PickObject(ObjectType.Element, filter);
FamilyInstance e = (FamilyInstance)doc.GetElement(reference);
TD(e.GetSubelements().Count.ToString());
what I am doing is returning a count of sub elements, just to see if I can access them, here is the code I used
TD() is shortcut function for TaskDialog.Show("task", e.GetSubelements().Count.ToString());
When I select my title border with the code, the result is '0' but this border is full of stuff.
Reading this, https://thebuildingcoder.typepad.com/blog/2010/02/nested-family-instance.html
Maybe I need to use 'GetSubComponentIds()' and 'SuperComponent' but I still get '0' when replacing 'GetSubelements' with 'GetSubComponentIds(). I am assuming that SuperComponent is the parent family, the definition is not clear. But I still return '0' with GetSubComponentIds which I am assuming is the nested family since maybe SuperComponent is a parent family? But neither definition is clear in the Revit API Doc.
Any guidance would be greatly appreciated.
Thanks
AlanC.
Solved! Go to Solution.