April 25, 2019

Design Automation for Inventor VS template

As mentioned in this blog post there is a Visual Studio Project Template you can use to create a new Inventor add-in that can be used with Design Automation API to drive Inventor on the cloud.

One benefit of this, apart from creating the necessary add-in that will drive Inventor Server, is that it also generates a helper project (see debugPluginLocally) which enables you to test the add-in locally. 

Inside Visual Studio just go to "Tools >> Extensions and Updates..." then search for "Design Automation for Inventor" and click "Download"

Visual Studio Template

Now when creating a new project you'll have the option to select the "Design Automation for Inventor" template

DA4I template

This will create a solution with two projects: one is the actual add-in that you can use with Inventor Server on Forge, the other is the helper project for testing the add-in locally:

DA4I add-in

When compiling the solution it also creates a zip for the add-in bundle in the Output folder that can be uploaded to Design Automation as an AppBundle:

Output folder

Just to show the various parts together. The "Bundle" folder is one level up from the Build Output folder, which is set to "bin\Debug" by default.
All the contents of that folder are then zipped up and placed in the "Output" folder, which will be a subfolder of the Solution's root folder:  

Folder structure

In case of using Visual Studio 2019 to create the project leave the option "Place solution and project in the same directory" unticked otherwise the relative path set for "PackagePathname" in "appsettings.json" of the "Interaction" project will not be correct. If you do prefer this option then just modify the value in "appsettings.json" accordingly.

Leave option unticked

Related Posts