Inventor Customization

Inventor Customization

Reply
Valued Mentor
tmccar
Posts: 491
Registered: ‎11-28-2007
Message 1 of 4 (1,484 Views)

Where to place Inventor addin

1484 Views, 3 Replies
02-01-2012 07:21 AM

I have gone through the "My First Addin" tutorial and created the addin in VB. But what is not clear from the tutorial is, where do I place the compiled program?  I know that for Vault Pro 2012, it goes in this folder:

C:\ProgramData\Autodesk\Vault 2012\Extensions  and when Vault starts up, it loads automatically.

    What about Inventor 2012? Where do the extensions need to be put? And how can it be disabled later - is this done by deleting the file from the said folder?

Employee
barbara.han
Posts: 37
Registered: ‎09-09-2007
Message 2 of 4 (1,466 Views)

Re: Where to place Inventor addin

02-02-2012 07:48 PM in reply to: tmccar

There is an explanation in Inventor API help doc. I copied it below for you:

 

The contents of a default .addin file are shown below.

<Addin Type="Standard">
<!--Created for Autodesk Inventor Version 16.0-->
<ClassId>{6c915cb4-c5ac-4658-bc31-f9025740656f}</ClassId>
<ClientId>{6c915cb4-c5ac-4658-bc31-f9025740656f}</ClientId>
<DisplayName>InventorAddIn1</DisplayName>
<Description>InventorAddIn1</Description>
<Assembly>InventorAddIn1.dll</Assembly>
<LoadOnStartUp>1</LoadOnStartUp>
<UserUnloadable>1</UserUnloadable>
<Hidden>0</Hidden>
<SupportedSoftwareVersionGreaterThan>15..</SupportedSoftwareVersionGreaterThan>
<DataVersion>1</DataVersion>
<UserInterfaceVersion>1</UserInterfaceVersion>
</Addin>
The common things to change are the DisplayName and Description which are both used in the Add-In Manager. The field youíll need to edit is the value for the Assembly element. This needs to be the full path to your add-in dll. In the example above it is InventorAddIn1.dll but it needs to be changed to C:\MyAddIns\AddIn1\InventorAddIn1.dll, or whatever the actual path and name of your add-in is.

The final step in getting your add-in to run is to place the files in the correct location. Your add-in dll can exist in any location since the .addin file specifies the location of the add-in. The .addin file must be copied to a specific directory. You have different options depending on the loading behavior you want.

 

Version Independent
Copying your .addin file to the locations listed below will allow your add-in to be loaded for all versions of Inventor. Inventor will read the ìSupportedVersionVersionXXX? portion of your .addin file to determine which versions of Inventor should load the addin.

Windows XP C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor Addins\
Windows 7/Vista C:\ProgramData\Autodesk\Inventor Addins\


Version Dependent
Copying your .addin file to the locations listed below will cause your add-in to be loaded only for that version of Inventor. The value of the ìSupportedSoftwareVersionXXX? setting in the .addin file is ignored, if present.

Windows XP C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor 2012\Addins\
Windows 7/Vista C:\ProgramData\Autodesk\Inventor 2012\Addins\


Per User
Copying the .addin file to the locations list below will cause the add-in to only be loaded for that particular user. If a user uses the Add-In Manager to make a change to how an add-in loads and the .addin file exists in one of the directories described above, the .addin file is copied to this per-user directory and updated with the changes specified in the Add-In Manager. This will override the settings in the orginal .addin file.

Windows XP C:\Documents and Settings\Application Data\Autodesk\Inventor 2012\Addins\
Windows 7/Vista C:\Users\AppData\Roaming\Autodesk\Inventor 2012\Addins\

As long as the manifest is embedded in your add-inís dll, your .addin file is in one of the directories specified above, and the .addin file correctly points to the location of your addin dll it should load.

 

In brief, you can save your .dll anywhere, but its path should be write in Assembly element in .addin file, and .addin file should be saved in specified place depends on it's version independent/version dependent/Per User.

Barbara Han
Developer Technical Services
Autodesk Developer Network
Valued Mentor
tmccar
Posts: 491
Registered: ‎11-28-2007
Message 3 of 4 (1,454 Views)

Re: Where to place Inventor addin

02-03-2012 01:46 AM in reply to: barbara.han

Thanks Barbara. What file extension should the above file have? Is it ".addin?" 

Employee
barbara.han
Posts: 37
Registered: ‎09-09-2007
Message 4 of 4 (1,453 Views)

Re: Where to place Inventor addin

02-03-2012 02:06 AM in reply to: tmccar

Yes. The file name format is Autodesk.SampleAddin.Inventor.addin.

Replace above "SampleAddin" with your addin application name.

Barbara Han
Developer Technical Services
Autodesk Developer Network
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.