I am new to Navisworks and its API so I wish to have some guidance. We are using Navisworks to open ifc models exported from Tekla and the model could be very large on number of model items. In Tekla I can select a model item quickly by its unique id through Tekla .NET API. After the model is exported to ifc then imported into Navisworks, the Tekla id becomes properties of model item but no longer the Navisworks id. My question is, will search for model item through Tekla id by calling SearchCondition.HasPropertyByDisplayName in Navisworks be slower than seaching through Navisworks native id? What is the preferred way to seach for model item efficiently? Any code snippet if possible will be highly appreciated, thanks!
Solved! Go to Solution.
The shortest answer is: Search API is the best option to find items. It is the fastest. Please refer to our blog for more.
Hi Mr. Liang,
Many thanks for your blog article and it really helps。
I have a further question on the same topic：
I can now create a plugin to search for matching property on model items in the active document. But will it be possible to search inside the active document from standalone application? In some other 3D software, the data link between standalone application and the software can be setup easily. But when I tried to create search instance in a standalone Winform application, I always received the error message as attached.
Could you please shed some light on this?
So, you are trying to use Search API in an automation app. The Automation part of the .NET API is a small assembly that can be referenced by developer applications. It contains enough to start Navisworks and perform some basic actions such as manipulate documents; however complex actions should be achieved using a plug-in which can still be called through Automation.
In another word, you need to write a plug-in to do Search and call the plug-in in automation by its Execute method. The SDK sample is MessageClientServer.
Hope this explains.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register