Navisworks API

Reply
Member
jianchengzou
Posts: 5
Registered: ‎05-09-2012
Message 1 of 4 (520 Views)
Accepted Solution

Select model item?

520 Views, 3 Replies
05-16-2012 05:23 AM

Hi,

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!

 

Regards,
Jiancheng

ADN Support Specialist
xiaodong.liang
Posts: 1,233
Registered: ‎06-12-2011
Message 2 of 4 (509 Views)

Re: Select model item?

05-21-2012 08:50 PM in reply to: jianchengzou

The shortest answer is: Search API is the best option to find items. It is the fastest. Please refer to our blog for more.

 

http://adndevblog.typepad.com/aec/2012/05/navisworks-net-api-find-item.html



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Member
jianchengzou
Posts: 5
Registered: ‎05-09-2012
Message 3 of 4 (491 Views)

Re: Select model item?

05-28-2012 04:48 AM in reply to: jianchengzou

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. :smileysad:

 

Could you please shed some light on this? 

 

Regards,

Jiancheng 

ADN Support Specialist
xiaodong.liang
Posts: 1,233
Registered: ‎06-12-2011
Message 4 of 4 (484 Views)

Re: Select model item?

05-28-2012 07:47 PM in reply to: jianchengzou

Hi Jianchen,

 

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.

 

Regards,

Xiaodong



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community