Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Access element in a loaded family

6 ANTWORTEN 6
Antworten
Nachricht 1 von 7
aclarke
521 Aufrufe, 6 Antworten

Access element in a loaded family

EDIT:

I just realized this is posted in the wrong section "Trouble Shooting".  I am not sure how to move this to the correct forum section 'General' other than re-post.

 

Hi all,

 

How can 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'.

Any guidance would be greatly appreciated.

 

Thanks

 

 

 

AlanC.

6 ANTWORTEN 6
Nachricht 2 von 7
hmunsell
als Antwort auf: aclarke


@aclarke wrote:

I have tried 'GetSubComponentIds()' and 'GetSubelements()' but both return '0'.


are you trying to use Dynamo? Dynamo has there own Forum.

https://forum.dynamobim.com/

Howard Munsell
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.



EESignature


Nachricht 3 von 7
aclarke
als Antwort auf: hmunsell

no, I am using C#

the snip-it you show, I can see the confusion, my mistake.

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 below, 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 got '0' when replacing 'GetSubelements' with 'GetSubComponentIds().  I am assuming that SuperComponent is the parent family, the definition is not clear.

 

ISelectionFilter filter = new myFunctions.mySelectionFilter();
            Reference reference = uidoc.Selection.PickObject(ObjectType.Element, filter);

            FamilyInstance e = (FamilyInstance)doc.GetElement(reference);
            TD(e.GetSubelements().Count.ToString());

 

Nachricht 4 von 7
hmunsell
als Antwort auf: aclarke

LOL... Oh, i'm not a Coder. but maybe someone else on here can make sense of it :-). i'm still trying to learn Dynamo.....

Howard Munsell
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.



EESignature


Nachricht 5 von 7
aclarke
als Antwort auf: hmunsell

lol...

So I assume I posted in the Revit Trouble shooting forum...  I will repost, in the proper place.

 

Thanks

Nachricht 6 von 7
PavelAnd
als Antwort auf: aclarke

It would be better, if you ask your question here.

Best regards, Pavel Plotitsyn.

Nachricht 7 von 7
aclarke
als Antwort auf: PavelAnd

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report