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 FindIncremental vs FindAll

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
JohnHon
618 Views, 2 Replies

Search FindIncremental vs FindAll

Dear all,

 

In the Search class, there are two methods for us to get the search result, named FindIncremental vs FindAll.

 

May I know what is the difference between them?

 

Thank you.

 

John

2 REPLIES 2
Message 2 of 3
xiaodong_liang
in reply to: JohnHon

Hi John,

 

happy new year! 

As far as I know, the only difference of the two methods is: FindIncremental is designed to work with these LINQ-style statements.e.g.the below is a demo code snippet our experts delivered on AU course:

 

//searching all the “Stairs” to find items where the “price” is greater than £100

Search search = new Search();

search.Selection.SelectAll();
search.SearchConditions.Add(
  SearchCondition.HasPropertyByName("LcRevitData“,
                         "LcRevitPropertyElementCategory").
    EqualValue(VariantData.FromDisplayString("Stairs")));

 

IEnumerable<ModelItem> expensive_items =
   from item in search.FindIncremental(Application.ActiveDocument, false);
   where ItemPrice(item) > 100
   select item;

 

 

Message 3 of 3
JohnHon
in reply to: xiaodong_liang

Hi Xiaodong,

 

Happy new year!

 

Thank you for your point as well as the code snippet.

It makes me clear!

 

Best Regards,

John

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report