Lesson 1: Creating Your First Inventor Add-In

Overview

In this lesson, you will create an Autodesk Inventor 2027 add-in using .NET 10 and Visual Studio Insider 2026. You will learn how to build an add-in that loads successfully into Inventor and connects to the application through the ApplicationAddInServer interface.

By the end of this lesson, you will:

  • Understand the Autodesk Inventor add-in lifecycle.
  • Know how Inventor loads and executes your add-in code.
  • Become familiar with the core Inventor API objects.
  • Create a managed C# add-in targeting .NET 10.
  • Successfully load, test, and debug your add-in in Inventor 2027.

What Is an Inventor Add-In?

An Autodesk Inventor add-in is a managed .NET assembly, typically a C# class library, that extends Inventor’s functionality through the Inventor API.

An add-in is:

  • Compiled into a managed DLL.
  • Loaded into the Inventor process by the application.
  • Connected to Inventor through the ApplicationAddInServer interface.
  • Built using the Inventor API to extend or automate design workflows.

Unlike simple macros or short scripts, add-ins can:

  • Provide reusable and maintainable functionality.
  • Register custom ribbon tabs, panels, buttons, and commands.
  • Listen for application and document events.
  • Automate modelling and drawing workflows.
  • Integrate Inventor with databases, enterprise applications, and external services.

Add-ins are particularly suitable for professional engineering solutions distributed within an organization or through the Autodesk App Store.

What Is an API?

An Application Programming Interface (API) is a collection of interfaces, classes, methods, and properties that allow developers to interact with a software application programmatically.

With the Autodesk Inventor API, you can:

  • Access and manipulate 2D and 3D geometry.
  • Automate part modelling, assembly creation, and drawing generation.
  • Create custom commands and user interface elements.
  • Read and modify document properties.
  • Respond to application and document events.
  • Integrate Inventor with external systems and business applications.

In this lesson, you will use the Inventor API to create the foundation of a working add-in.

Prerequisites

Before starting, ensure that the following software and components are available.

Visual Studio Insider 2026

This lesson uses Visual Studio Insider 2026 as the development environment.

Visual Studio Insider builds provide access to newer development tools and features. Because Insider builds may change during development, some menu names, project templates, and configuration options may differ between releases.

For production development, use a supported Visual Studio edition and configuration that is compatible with the required .NET SDK.

Install the Required Workload

During Visual Studio installation, select the .NET desktop development workload.

This workload provides the essential tools for developing C# applications and class libraries, including project configuration, debugging, and .NET build support.

If the workload is not installed, open the Visual Studio Installer, select your Visual Studio Insider installation, and modify the installed components.

For additional information, refer to the Microsoft documentation:

https://learn.microsoft.com/en-us/visualstudio/install/workload-and-component-ids

Important: Workloads and individual development components are installed or modified through the Visual Studio Installer, not directly from the IDE.

Install the Autodesk Inventor 2027 SDK

The Autodesk Inventor SDK provides API documentation, sample projects, and development resources that help you build Inventor extensions.

Follow these steps:

  1. Install Autodesk Inventor 2027.
  2. Locate the Inventor 2027 SDK installer or development resources provided with your installation or through Autodesk.
  3. Install the available SDK components and samples.
  4. Restart Visual Studio Insider 2026 after installation.
  5. Check whether the Inventor add-in project templates are available.

If the C# Inventor add-in template does not appear, verify the following:

  • The appropriate Inventor SDK components are installed.
  • The .NET desktop development workload is enabled.
  • Visual Studio Insider 2026 was restarted after installing the SDK.
  • The installed SDK templates support your Visual Studio version.

Note: SDK templates and sample availability can vary by Inventor release and installation package. You may need to create a C# Class Library project manually and configure it to reference the Inventor API assemblies.

Target Framework: .NET 10

For this lesson, the target framework is .NET 10.0.

.NET 10 is a modern, long-term support (LTS) release of the .NET platform. It provides current C# language features, performance improvements, and a supported foundation for developing managed applications.

Before selecting .NET 10, verify that the Inventor 2027 add-in hosting environment and the Inventor API assemblies support the intended .NET runtime.

Inventor’s API has historically exposed COM-based interfaces, and the availability of a modern .NET runtime does not automatically guarantee that every Inventor add-in hosting configuration supports it. Confirm the supported runtime and add-in loading requirements in the Inventor 2027 SDK documentation.

Microsoft’s official .NET documentation is available here:

https://learn.microsoft.com/en-us/dotnet

Note: Refer below blog link, if Inventor templates are missing in Visual studio IDE
https://blog.autodesk.io/missing-autodesk-inventor-templates-in-visual-studio/


Steps to Create Your First Add-In

1. Launch Visual Studio

Start Visual Studio.

Select Create a new project.

Search for:

Autodesk Inventor C# Addin (for ex: Autodesk Inventor 2027 C# Addin).

Select the template and click Next.

Name your project, for example:

MyFirstInventorAddIn


2. Implement ApplicationAddInServer

Every Inventor add-in must implement the ApplicationAddInServer interface—the entry point Inventor uses to communicate with your plugin.

Replace the default class with this minimal implementation:

using Inventor;
using System.Runtime.InteropServices;

namespace MyFirstInventorAddIn
{
    [Guid("E6A1A1E2-1234-4567-ABCD-1234567890AB")]
    public class AddInServer : ApplicationAddInServer
    {
        private Inventor.Application _inventorApp;

        public void Activate(
            ApplicationAddInSite addInSiteObject,
            bool firstTime)
        {
            _inventorApp = addInSiteObject.Application;

            // Minimal proof that add-in loaded
            _inventorApp.StatusBarText =
                "MyFirstInventorAddIn loaded successfully";
        }

        public void Deactivate()
        {
            _inventorApp = null;
        }

        public void ExecuteCommand(int commandID)
        {
            // Not used in this lesson
        }

        public object Automation => null;
    }
}

3. Assign a Unique GUID

Each add-in must have a unique GUID.

In Visual Studio:

Tools → Create GUID

Replace the value in the [Guid(...)] attribute.

Inventor uses this GUID to identify your add-in.


4. Build the Project

Set configuration to Debug and build the solution.

This generates a DLL in:

bin\Debug

⚠️ Important: Inventor does NOT automatically discover DLLs from this folder.
An .addin manifest file is required.


Creating the .addin Manifest (Preferred Loading Method)

Registry-based add-ins are no longer the recommended approach.

Modern Inventor development uses a registry-free .addin file.

Example .addin file:

?xml version="1.0" encoding="utf-8"?>
<addin type="Standard">
  <name>MyFirstInventorAddIn</name>
  <assembly>C:\Path\To\Your\DLL\MyFirstInventorAddIn.dll</assembly>
  <addintype>Standard</addintype>
  <loadonstartup>1</loadonstartup>
  <userunloadable>1</userunloadable>
</addin>

Place the file in one of these locations:

Per-user:

%APPDATA%\Autodesk\ApplicationPlugins\

All users:

%PROGRAMDATA%\Autodesk\Inventor Addins\

Note: LoadOnStartUp controls whether the add-in loads automatically. This is configurable and not guaranteed by default.


Running and Debugging the Add-In

Option 1 — Debug Using an Executable Launch Profile (Recommended)

Instead of manually launching Inventor and attaching the debugger, you can configure Visual Studio to start Inventor automatically when debugging.

This is the preferred approach for professional add-in development.


Step-by-Step: Create an Executable Launch Profile

Step 1 — Open Launch Profiles

  • Right-click your Project in Solution Explorer
  • Select Properties
  • Navigate to the Debug tab
  • Click: 👉 Open debug launch profiles UI

Step 2 — Create a New Profile

Inside the Launch Profiles window:

  • Click Add (+)
  • Choose Executable
  • Name it something meaningful, for example:
    Inventor 2027 Debug

Step 3 — Configure the Profile

Executable

Provide the full path to Inventor:

C:\Program Files\Autodesk\Inventor 2027\Bin\Inventor.exe

(Use Browse if needed.)

Command Line Arguments (Optional)
Usually not required for Inventor. Leave empty unless you need special startup behavior.

Working Directory

Set it to the Inventor Bin folder:

C:\Program Files\Autodesk\Inventor 2027\Bin

✅ This prevents assembly-loading issues.


Step 4 — Build the Project

Press:

Ctrl + Shift + B

Ensure the build succeeds before debugging.


Step 5 — Select the Profile

From the Visual Studio toolbar near the Run button:

Select:

Inventor 2027 Debug

This is typically faster than attaching manually.


Option 2 — Attach to Process

  • Start Inventor
  • In Visual Studio:
    Debug → Attach to Process → Inventor.exe
  • Set breakpoints in Activate

Understanding the Add-In Lifecycle

When Inventor starts:

  • Inventor scans .addin manifests
  • The DLL is loaded (if configured)
  • Activate() is called
  • The add-in remains resident
  • Deactivate() is called during shutdown

Key Objects Introduced

ObjectPurpose
ApplicationAddInServerEntry point for add-ins
ApplicationAddInSiteProvides access to Inventor
Inventor.ApplicationRoot API object

The Application object is your gateway to:

  • Documents
  • User interface
  • Geometry
  • Commands
  • Events

Distribution Considerations

For commercial deployment:

  • Use an installer to place the .addin file
  • Follow Autodesk App Store packaging guidelines
  • Ensure version compatibility

Publishing through the Autodesk App Store is strongly encouraged for production solutions.


Note: This lesson was authored and validated using Autodesk Inventor 2027. However, the concepts apply broadly to modern Inventor versions unless otherwise noted.


Summary

You have learned how to:

  • Create an Inventor add-in
  • Implement ApplicationAddInServer
  • Generate a GUID
  • Configure a registry-free .addin loader
  • Debug your add-in
  • Understand the add-in lifecycle

You are now ready to begin building production-grade extensions for Autodesk Inventor.


Comments

One response to “Lesson 1: Creating Your First Inventor Add-In”

  1. […] Lesson 1: The Basic Inventor Add-In […]

Leave a Reply