Which inventor addin template

Which inventor addin template

NachoShaw
Advisor Advisor
560 Views
6 Replies
Message 1 of 7

Which inventor addin template

NachoShaw
Advisor
Advisor

Hey

 

Mixed bag today of results. Which template is better?

 

The nifty template from Brian, its out of date but easy to set up**

 

The 2024 template that appears in the visual studio templates. It's up to date but much harder to set up**

 

**nothing about how to prep an icon with any of them. I've tried .ico, .png but nothing...

 

NSS RAIN. Was actually great but it's out date and the developers don't really care for it anymore 

 

 

Are there any other templates out there?

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
561 Views
6 Replies
Replies (6)
Message 2 of 7

Michael.Navara
Advisor
Advisor

It depends on your needs. How many addins you plan to create?

I have created tens of addins for end customers and I have created my own template. But it is only slightly modified default template.

Lot of functionality I put into my own DLL library which I reference to all projects. This library contains for example Command wrapper for easy command creation, converter from ICO file to IPictureDisp for command icons (similar to this), extension methods for CommandManager.PromptMessage which converts the behavior near to the  WinForms MessageBox and many more.

In my opinion this is the best approach for anyone, who plan to create and maintain more then one or two addins.

0 Likes
Message 3 of 7

yan.gauthier
Advocate
Advocate

For Icons, you can simply Convert from an Image to IPictureDisp using Stdole.dll : 

   internal class AxHostConverter : AxHost
   {
       private AxHostConverter() : base("") { }

       static public stdole.IPictureDisp ImageToPictureDisp(Image image)
       {
           return (stdole.IPictureDisp)GetIPictureDispFromPicture(image);
       }
       static public Image PictureDispToImage(stdole.IPictureDisp pictureDisp)
       {
           return GetPictureFromIPicture(pictureDisp);
       }
   }

 

An Image can be anything such as a Bitmap. Only requisites is that it respect the sizing (16x16 for small icons, 32x32 for big icons). 

0 Likes
Message 4 of 7

bretrick30
Advocate
Advocate

Hey,

 

I created an Addin template to try and make adding buttons to the ribbon as simple as possible, with icons. It is available on GitHub.

 

bretleasure/Inventor.AddinTemplate: Easy to use C# template for creating Autodesk Inventor Addins (g...

Message 5 of 7

j.romoYDW7Q
Contributor
Contributor

I really found easier to start from scatch following Jelte de Jong tutorials, now i do them easy.

http://hjalte.nl/tutorials 

Just my 2 cents.

 

 

Message 6 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @NachoShaw 

 

You can find a couple of simplified add-in templates from an Autodesk University class I presented last fall at this link:
Bridging the Gap Between iLogic Automation and Inventor Add-Ins | Autodesk University

Here is a direct link to the *.zip file because the AU page is showing it as a PDF icon for some reason

https://static.au-uw2-prd.autodesk.com/Additional-Materials-MFG601910-CurtisWaguespack-AU2023_170171...


This class walks you through how to spin up a basic add-in that comes with some simple buttons that you can configure to your liking, and/or you can add to it and create your own.

MFG601910 AU Custom Inventor Addin Button Basic Template Example.png

 

And also has another template that comes with some of the more advanced "button stacks" with dropdowns, etc. that you can also configure to your liking, and/or you can add to it and create you own:

MFG601910 AU Custom Inventor Addin Button Stacks Template Example.png

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

EESignature

0 Likes
Message 7 of 7

NachoShaw
Advisor
Advisor

much appreciated for the responses. A further question: Over the weekend i took Brians existing 2018 Nifty addin and updated it to 2024, updated so Post Build events, added some template ribbon code for drawings & assemblies and then saved it back in the same format as the original. When i added to the templates folder for VS, it wouldnt show. Is there a file i need to add the template to or a registry key that needs adding?

 

Thanks again

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes