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: 

How to reference other dlls into my plugin

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Paulio
1924 Views, 3 Replies

How to reference other dlls into my plugin

Ok this is my setup.

 

I have:

 

A plugin for Navisworks.

An executable which calls and runs the plugin.

A dll containing forms and methods that both the executable and the plugin need to access.

 

My question is: Where do I need to put this dll so that the plugin can find it? Currently, when I'm trying to debug my plugin, I'm getting a "could not load file or assembly {my dll}... The system cannot find the file specified" error as soon as it tries to access a method in the referenced dll.

 

I'm pretty new to Navisworks so any help would be very much appreciated.

 

Thanks

3 REPLIES 3
Message 2 of 4
xiaodong_liang
in reply to: Paulio

You need to copy any dependencies of the plugin except any generated by the Navisworks API into the 'dependencies' folder, instead of the same folder of the plugin dll 

 

 e.g. Assume the plugin is "NWPlugin", it has one dependent class: Class1.

 

<NW>\Plugins\NWPlugin\NWPlugin.dll

 

<NW>\Dependencies\Class1.dll

Message 3 of 4
Paulio
in reply to: xiaodong_liang

Excellent. Thank you very much.

Message 4 of 4

I have a related question...

Say a plugin uses newer version of 3rd party DLLs which are also shipped with Navisworks (e.g. Syncfusion or NewtonSoft), and these newer DLLs get installed into the <NW>\Dependencies\ folder.

These newer DLLs usually have additional or changed methods or properties.

What seems to happen now is that the DLLs from the <NW> folder are used, not the DLLs from the <NW>\Dependencies\ folder.

As a result you get missing method exceptions.

 

 

How to resolve that?

 

Thanks

Wolfgang

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

Post to forums  

Rail Community


Autodesk Design & Make Report