Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get individual elements within an insterted ifc

1 REPLY 1
SOLVED
Reply
Message 1 of 2
klqa_test
519 Views, 1 Reply

Get individual elements within an insterted ifc

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.

Labels (1)
  • ifc
1 REPLY 1
Message 2 of 2
naveen.kumar.t
in reply to: klqa_test

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community