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

Search Item > Icon = "Composite Object"

3 REPLIES 3
Reply
Message 1 of 4
m.p.diker
710 Views, 3 Replies

Search Item > Icon = "Composite Object"

I'm trying to write a plugin that exports all elements RevitIDs along with their timeline data.

 

In order for it to work (on doors, windows etc.) I have to eliminate all Revit Types.

 

The only property I could have found for this is the Icon

 

Item > Icon = "Composite Object" vs. Collection and Geometry.

Is there any other more practical way for that?

 

Second is no matter how much I've examined sample codes and tried to write a search for this I couln't figured it out.

 

Please help me write a search condition for Item > Icon = "Composite Object"

 

Thanks in advance..

3 REPLIES 3
Message 2 of 4
m.p.diker
in reply to: m.p.diker

From navisworks creating a search for it works fine. When I export the search out as xml

"Composite Object" data type shows as NAME. And I couldn't find a way to mimic this search in the Api..

Message 3 of 4
xiaodong_liang
in reply to: m.p.diker

Hi,

 

If I understand correctly, you want to create a search with the condition if the item is composite object? You could use Search + LINQ to do so. e.g.

 

   // assume you have define a search

    IEnumerable<ModelItem> finalItems = 

        search.FindAll(activeDocument,false).Where(x=> x.IsComposite);

 

Hope this helps.

Message 4 of 4

Using LINQ here is prohibitively slow unfortunately, trying to say grab all the composites in a project will scale very poorly with what is effectively a for loop.

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

Post to forums  

Rail Community


Autodesk Design & Make Report