1 Sep 2020

Design Automation for Inventor VS template - VB.NET

The Visual Studio project template we provide for Design Automation for Inventor is only available in C#
However, some Inventor add-in developers use VB.NET

I checked if there was an easy way to convert the C# project that the project template generates to a VB.NET one. I found the Code Converter Visual Studio extension and gave it a try.

After installing the extension I just had to right-click on the AppBundle project (named "TestPlugin" in my case) and select "Convert to VB"

CodeConverter

There were some dialogs I had to click towards the end of the conversion: 

Dialogs
As you can see both the project and the code files in it turned into VB:

​​VB project
When I tried to compile the converted project there were a few problems I had to correct:

Compiler errors

Turned out I just had to change the "dynamic" keywords to "Object" and that solved the other errors as well, and so my project compiled just fine after that:

Rename dynamic to Object

I also tried to convert the "Interaction" project, but that did not work even after fixing the issues the compiler complained about. On the other hand that project does not need to be modified apart from adding the settings and URLs that you want to work with.

Here is the solution with the VB.NET AppBundle project in it: https://github.com/adamenagy/Container/blob/master/AppBundle-VB.NET.zip 

 

Related Article