Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert VB.net Plug-in to Add-in

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
J_Dumont
643 Views, 2 Replies

Convert VB.net Plug-in to Add-in

I just finished my first Plugin for Inventor in VB.Net using Visual Studio 2015. I prefer that the program be an Add-in and I'm not sure if there's an easy way to convert my Plug-In to an Add-in. I've seen the Inventor template that gets installed with the SDK but it appears that what you use when you start from scratch. 

Labels (4)
2 REPLIES 2
Message 2 of 3
yan.gauthier
in reply to: J_Dumont

You did an .exe that marshals the inventor Application ?

 

Basically, you use the AddinServer class (just like the example in the SDK). in the activate method of this class, Inventor passes its AddInSiteObject which contains the Inventor.Application. From that point, your code should be almost identical.

 

You then place your compiled .dll (class library) along with the .addin file in either 

 

C:\ProgramData\Autodesk\Inventor 2020\Addins

 

or

 

C:\%USERPROFILE%\AppData\Roaming\Autodesk\Inventor 2020\Addins

 

ProgramData bring the addin to every user on this computer, but requires Admin access, AppData is user specific.

 

When opening inventor, it will detect the new addin and ask you if you want to allow it (you can alway browse addins from the Environments ribbon later)

 

Note: Use the .addin file from the SDK example to guide you. It will help you understand to match ID, GUID and assembly name.

 

Also, if you wish to run in debug mode, go to your project properties: in the debug section, select Start external program and point to something like : C:\Program Files\Autodesk\Inventor 2020\Bin\Inventor.exe

 

in the build section, select the output path to be where the addin needs to be (if ProgramData you will need to run VS as admin). You need Inventor to be closed before starting to debug since it will overwrite the dll that would be otherwise write-protected by Inventor.

 

Message 3 of 3
J_Dumont
in reply to: yan.gauthier

Thank you for your input.

I will try to follow your steps to create the add-in.

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

Post to forums  

Autodesk Design & Make Report