Addin loading locations

Addin loading locations

AlexFielder
Advisor Advisor
2,855 Views
3 Replies
Message 1 of 4

Addin loading locations

AlexFielder
Advisor
Advisor

Hi all,

 

As I understand it, Inventor Professional 2016 will load addin .dll files from the following locations:

 

  1. "%appdata%\Autodesk\ApplicationPlugins\subfolder" = version-independant
  2. "%programdata%\Autodesk\Inventor Addins\subfolder" = user-specific
  3. "%appdata%\Autodesk\Inventor 2016\Addins\subfolder" = version-specific

Would I be correct in assuming that Inventor is hard-coded to only accept addin .dll files from these locations, or should I be able to point this section of the .addin file to anywhere I choose:

 

<Assembly>"C:\Some\path\to\my\Addin\AddinName.dll"</Assembly>

This would be different to Revit:

 

<Assembly>"C:\Program Files\Dynamo 0.8\Revit_2016\DynamoRevitDS.dll"</Assembly>

which does allow the .addin file to dictate where addin .dlls can be loaded from.

 

?

 

0 Likes
Accepted solutions (1)
2,856 Views
3 Replies
Replies (3)
Message 2 of 4

wayne.brill
Collaborator
Collaborator
Accepted solution

Hi Alex,

 

You can use a path in the Assembly attribute and Inventor will load it from there. I do this all the time when I am testing and debugging Add-Ins. For example:

<Assembly>C:\Cases\ETO_Cases\11150532 UI with drawing Problem\bin\Debug\Some_test_Add-In.dll</Assembly>

 

This is from the help. ("Creating an Inventor Add-In" > "Making Your Add-In Known to Inventor")

 

Assembly - This is the path to you add-ins dll. This can be a full path or a relative path where it's relative to the location of your .addin file. It can also be relative to the Inventor\bin directory however since you're not allowed to install into that directory with Administrator privileges it's not recommended that you use that directory. A path relative to the location of the .addin file is recommended and is discussed in more detail below.

 

Please let me know if the behavior you get is different than this.

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 4

AlexFielder
Advisor
Advisor

Hi Wayne,

 

I see the same behaviour as you stated.

 

I'm not sure why I thought it was any different.

 

Thanks,

 

Alex.

0 Likes
Message 4 of 4

AlexFielder
Advisor
Advisor

Hi Wayne.

 

I have been puzzling over this for a little while now and I thought I had it solved, but:

 

In the course of my investigations I have been using the fusion log viewer to attempt to debug when and where addins fail to load because of some hidden dependency. - FWIW: the fusion log shows where the assembly is being looked for if it is failing to resolve.

 

I have also noticed that once an Addin is loaded Inventor seems to copy the .addin file and edit out a whole bunch of lines that it should otherwise need.

 

The files are copied to this path:

 

%appdata%\Autodesk\Inventor 2016\Addins

 

You can easily decipher which files have been copied/edited because the filenames look this: autodesk.simulationstressanalysis.inventor.addin i.e. all lower case.

 

Which of the paths I initially listed should I be using for the .addin file itself?

 

Thanks,

 

Alex.

0 Likes