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: 

Check out the self-paced guide “My First Plug-in”

68 REPLIES 68
Reply
Message 1 of 69
wayne.brill
33973 Views, 68 Replies

Check out the self-paced guide “My First Plug-in”

Check out the Self-Paced Guide “My First Plug-in” presented by the ADN Inventor Team

www.autodesk.com/myfirstinventorplugin

 

Are you an Autodesk Inventor power user with an interest in becoming even more productive? Would you like to automate or extend the capabilities of Inventor, but are new to computer programming? If so, then this guide is designed for you.

 

“My First Plug-in” is a self-paced tutorial guide for a smooth introduction into the programming world. This is a “one-stop shop” learning path for users who know Autodesk products but are absolutely new to programming and are thinking about taking the plunge. In this guide, you will be working with the Autodesk Inventor API and the VB.NET programming language.

 

There are many resources available on the web for you to learn about the Autodesk Inventor API (Application Programming Interface), however, these resources tend to be designed for people who already know programming. This guide is different: it assumes no previous programming knowledge and yet helps you build your first plug-in quickly, without swamping you with details. You’ll have a working application within an hour of starting this material, irrespective of your current level of programming expertise.

 

The guide will start by reviewing the benefits of customizing Autodesk software before progressing onto lessons covering the use of the Autodesk Inventor API. The lessons will start by building a working plug-in before covering more detailed explanations of the underlying principles and further developing the application’s functionality.

 

Product: Autodesk Inventor

Programming Language: VB.NET

Application Programming Interface (API): Inventor API

If you have any feedback on this new guide let us know at myfirstplugin@autodesk.com



Wayne Brill
Developer Technical Services
Autodesk Developer Network

68 REPLIES 68
Message 61 of 69
Rory_M
in reply to: wayne.brill

Putting aside the general unfriendliness of the tutorial for a moment, can it be updated to reflect the correct version of Visual Studio?

 

At the moment the first page of the tutorial mentions VS2017 but the Microsoft site it links to doesn't go to this, it eventually leads to Visual Studio 2022 Community.

 

Not knowing any better I started to install VS2022 Community as I assumed it was sensible to have the latest version and the first dialog asks what components to install.

 

I was unsure so started to do some digging in the forums and according to general comments, VS 2022 doesn't appear to be supported.

 

Further searching led me to see that it might be supported as the autodesk website has a workaround that involves installing VS2019 as well and copying/pasting files between the two:

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Developertools-msi...

 

I'm a fairly inexperienced coder, but have made a few useful iLogic routines and was looking to delve a little deeper into the world of programming & automation. An official Autodesk tutorial sounded like a great starting point but falls at the first hurdle as it's not up to date.

 

This tutorial should either be updated or removed, especially as it's a pinned post at the top of this forum. 

One quote from the pinned post  is "This guide is different: it assumes no previous programming knowledge and yet helps you build your first plug-in quickly, without swamping you with details. You’ll have a working application within an hour of starting this material, irrespective of your current level of programming expertise."

 

Leaving it in this outdated and unclear state goes against the point of a tutorial for people with "no previous programming knowledge" and is a major barrier to entry.

Message 62 of 69
Rory_M
in reply to: wayne.brill

As a follow on to my complaint about the official tutorial, I have to say a big thanks to @JelteDeJong for his work, especially the section about installing Visual Studio 2022, that's cleared things up.

 

If I get some spare time at work I'll be working through them over the next few days.

Message 63 of 69
yan.gauthier
in reply to: Rory_M

VS 2022 does indeed work. It has nothing to do with Autodesk. If you are referring to linking the templates. those are simply files that can be pasted at the template location. see in your options in VS 2022 as to where those are: 

yangauthier_0-1712077707113.png

Although I agree that this tutorial isn't really helpful... I believe it would be easier to just start from scratch since those template are not different from the examples in the SDK. 

Message 64 of 69
JelteDeJong
in reply to: yan.gauthier

My tutorial is written with VS022 in mind but it does not work with template files. Evry thing is created/setup from scratch. Therefore it should work with any editor. I even managed to write an addin with Visual code. I have to admit that it was not easy but possible.

That brings me to my next point if you start a new project. Be aware that Inventor 2025 brings us big changes. The API has been migrated from .Net framework 4.8 to .Net core 8. If you start creating new addons it might be wise to check if you can do it in .Net core 8. But keep in mind that officialy .Net core was not supported before Inventor 2025. (I did hear that some people did have some good results with .Net cor on lower versions of Inventor.)

If you want to know what it takes to migrate a solution then have a look at my post: "Migration addins to .Net core 8 (Inventor 2025)"

Im also writing a new tutorial for people who want to create new addons for Inventor 2025/.Net Core 8. I will post a link here when it's finished.

Jelte de Jong
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.

EESignature


Blog: hjalte.nl - github.com

Message 65 of 69
Rory_M
in reply to: wayne.brill

Thanks @JelteDeJong for the additional info.

Pardon my ignorance but does the .net framework upgrade mean that older addins will no longer work with Inventor 2025?

Message 66 of 69
yan.gauthier
in reply to: JelteDeJong

I am one of those who runs .NET 6 within inventor. I have both Blazor and WPF UIs running in my addin. I do not really advocate for automatic conversion. It rarely works as intended in my experience. The most important part is setting your project file correctly

 

yangauthier_0-1712175317452.png

Then, Resolving errors one by one is the most effective since there are some breaking changes from .NET framework 4.8 to .NET 8. Namely, Entity framework that is now Entity Framework Core and asp.NET. The rest is pretty similar. You'll get a bunch of warnings since Nullables are no longer handled the same.

 

If you want to get ahead and use .NET 5 or higher with Inventor from an older version than 2025, Follow this project from @pockybum522  https://github.com/PockyBum522/template-inventor-core-addin

Message 67 of 69

My addins are all based on Templates an I have minor issues converting them to .Net 8.

What I do is:

  1. First Copy the files
  2. open the project in the updated version of VS 2022
  3. run the upgrade process
  4. add the new Inventor2025 dll file
  5. rebuild all
  6. open the vbproj file and remove the Postbuilt settings, delete them
  7. save the vbproj file
  8. <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="WHERE MT.EXE&#xD;&#xA;IF ERRORLEVEL 1 call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsall.bat&quot; amd64&#xD;&#xA;mt.exe -manifest &quot;$(ProjectDir)ABCDEFGHIJKLMNOPQRSTUVWXYZ.X.manifest&quot; -outputresource:&quot;$(TargetPath)&quot;;#2&#xD;&#xA; XCopy &quot;$(TargetPath)&quot; &quot;%25AppData%25\Autodesk\ApplicationPlugins\$(TargetName)2025\&quot; /Y /R&#xD;&#xA; XCopy &quot;$(ProjectDir)Autodesk.ABCDEFGHIJKLMNOPQRSTUVWXYZ.Inventor.addin&quot; &quot;%25AppData%25\Autodesk\ApplicationPlugins\$(TargetName)2025\&quot; /Y /R&#xD;&#xA; " />
    </Target>
    bradeneuropeArthur_0-1712176411591.png

     

  9. sometimes I need to add this to my code somewhere:
    System.Windows
  10. That is all

If you need further assistance please let me know.

 

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 68 of 69
AMHumiston
in reply to: wayne.brill

afternoon!

 

I'd like to connect on a project like this. i'm using vb.net and studio to create a add-in and ribbon interface for company commands and ilogic rules.

 

 

Message 69 of 69

Please have a look at @JelteDeJong his home page. He created an add in for using ilogic rules!

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report