My First Inventor Plug-in Overview

Autodesk Support

May 11, 2021


My First Inventor Plug-in Overview >> Lesson 1 >> Lesson 2 >> Lesson 3 >> Lesson 4 >> Lesson 5 >> Lesson 6

“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 COM API and the Visual Basic programming language(VB.net), however if you prefer the programming language C# we have provided the code samples in this language as well.

Product: Autodesk Inventor
Programming Language: VB.NET (and C# - does not include written explanations for C# code samples)
Application Programming Interface (API): Inventor COM API

 Overview

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 plug-in 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 modifying a Visual Basic project that connects to an Inventor session before covering more detailed explanations of the underlying principles and further developing the plug-ins functionality.

The Benefits of Customizing Autodesk Inventor

In today’s world, you’re encouraged to become more and more efficient. This is a key benefit of customization: tailoring the software you use on a daily basis to streamline workflows increases your efficiency. Autodesk provides powerful APIs and Software Development Kits (SDKs) that allow you to gain greater value from your investment in Autodesk software by tailoring it specifically to the needs of your business.

Autodesk Inventor provides a rich API that can be used to customize the product’s existing features or by adding entirely new ones. You can automate repetitive, time-consuming tasks and extend core features without leaving the Autodesk Inventor environment. The API can be used to create custom tools and features that plug directly into Autodesk Inventor, extending its functionality.

The Autodesk Inventor API is based on a COM technology which means you can use a variety of programming languages (VB.NET, C++, C# and Python) to develop a plug-in. While each language has its own relative benefits, VB.NET is the natural choice for this guide: it is easy-to-learn, easy-to-use and a good general-purpose programming language. As you become comfortable with the content of this guide – and more proficient with VB.NET - you’ll be able to move on to solving more and more complex problems with the language.

Programming can be very rewarding. We hope you feel that way too after completing these lessons. Have fun!

Summary of the Plug-in

“My First Plug-in” provides control over the visibility of groups of components in an Inventor assembly: the plug-in is designed to ask the user to select a set of components before tagging them, allowing the groups to be hidden and shown at the click of a button.

Inventor allows you to set the component visibility via its user interface, but it’s a laborious process: you need to browse to each component in order to set its visibility individually. By using the API you can automate the process, allowing groups of components to be hidden or shown. This type of task is ideally suited for automation via the Inventor API, and this guide will take you through the process of doing just that.

Video: The Completed Plug-in
This video demonstrates the final plug-in you will be creating in Lesson 6 of this “My First Plug-in” guide.

Software to Install Prior to Starting

Summary of the Lessons

  • Lesson 1: The Basic Plug-in 
    In this lesson, you will begin by writing part of a VB.NET application that uses the Autodesk Inventor API to hide selected components.
  • Lesson 2: Programming Overview
    In this lesson, you will look more closely at what happens when you execute the plug-in code, exploring the Visual Studio 2017 Community environment.
  • Lesson 3: A First Look at Code
    In this lesson, you will take a closer look at the Inventor API by continuing work on the project you created in Lesson 2, extending it to use the Inventor API to connect to or start a session of Inventor while taking a close look at how the code actually works.
  • Lesson 4: UI’s and Coding Logic
    In this lesson, you will add a button to the form and have it hide selected components; using the code you entered in Lesson 1. You will now spend some time to understand how the code functions.
  • Lesson 5: Adding Attributes
    In this lesson, instead of directly hiding the selected components, you will now modify the code to “tag” your components so they may be hidden or displayed. Attaching attributes provided by the Inventor API will allow us to identify and perform different operations on your tagged components.
  • Lesson 6: My Final Plug-in
    In this lesson, instead of toggling the display of the components, you add a button to provide the user with the direct capability to either show or hide the components. You also add two more buttons, one to remove your attribute tag from the selected components and another to remove the attribute from all components.

My First Inventor Plug-in Overview >> Lesson 1 >> Lesson 2 >> Lesson 3 >> Lesson 4 >> Lesson 5 >> Lesson 6



Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support