Get individual elements within an insterted ifc

Get individual elements within an insterted ifc

klqa_test
Contributor Contributor
664 Views
1 Reply
Message 1 of 2

Get individual elements within an insterted ifc

klqa_test
Contributor
Contributor

After inserting an ifc, i got a box that covers the elements within, i am unable to select the individual elements as everytime i click on it it only selects the entire box, is there a way to code such that i can get the individual elements within that box.

0 Likes
Accepted solutions (1)
665 Views
1 Reply
  • IFC
Reply (1)
Message 2 of 2

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @klqa_test ,

try using the below code

 //Get the LINKED DOCUMENT
               Document linkedDoc = null;
               foreach(Document d in app.Documents)
               {
                    if(d.Title!=doc.Title && d.Title=="Your Linked Document Title")
                    {
                        linkedDoc = d;
                        break;
                    }
               }
               
               //Get the linked element id
                Reference R = uidocument.Selection.PickObject(ObjectType.LinkedElement);
              //Get the linked element from linked document
                Element e = linkedDoc.GetElement(R.LinkedElementId);

Here are some related links

https://thebuildingcoder.typepad.com/blog/2013/09/access-to-individual-elements-in-linked-projects.h... 

https://adndevblog.typepad.com/aec/2014/02/how-to-get-the-picked-element-in-the-linked-model.html

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes