Inventor.AddinTemplate 0.1.8

There is a newer version of this package available.
See the version list below for details.
dotnet new install Inventor.AddinTemplate::0.1.8
This package contains a .NET Template Package you can call from the shell/command line.

Inventor Addin Template

NuGet version (Inventor.AddinTemplate)

Overview

The goal of this template is to make crafting an Inventor addin as easy as possible. All that is required is to create the buttons and write the code that will be executed when the buttons are clicked. The template will handle adding the buttons to the ribbon.

The template is designed to be used with Visual Studio or JetBrains Rider.

Installation

The template can be installed using the dotnet CLI. The command to install the latest version can be found on the NuGet.org page.

Usage

Once the template is installed it will appear in the list of available project templates in Visual Studio and Rider.

Addin Components

These are the components that will be created when the addin is compiled.

.addin File

The .addin file is the entry point for the addin. It is an XML file that describes the addin and its components. The file is used by the Inventor Addin Manager to load the addin.

The .addin file is a pointer to the .dll file. It is also used to specify the addin's name, description, and other properties.

.dll File

The .dll file is the compiled addin. It is a dynamic link library that contains the addin's code.

Adding Buttons

Adding buttons is very simple. Just create a class that inherits the InventorButton class and implement the abstract methods. The InventorButton class will handle adding the button to the ribbon and executing the code when the button is clicked.

All button classes in this project will be loaded into the Inventor UI. A button can be prevented from being loaded by overriding the Enabled property to return false.

Execute Method

This method is called when the button is clicked. This is where the code that the button will execute should be placed.

Ribbon Tabs and Panels

The GetRibbonName() and GetRibbonPanelName() methods are used to specify the tab and panel that the button will be added to. If the name matches the InternalName of an existing tab or panel the button will be added to that tab or panel. Otherwise a new tab or panel will be created.

Internal names can be found using the Inventor.InternalNames package that is included with this template.

Icon Resources

Button icons need to be .PNG files and be added to the project as embedded resources.

Check out the DefaultButton class for an example of how to add a button to the ribbon.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 2,521 2/23/2024
1.0.3 751 2/15/2024
1.0.2 558 2/14/2024
1.0.1 701 2/10/2024
1.0.0 521 2/9/2024
0.1.14 633 2/8/2024
0.1.13 696 2/8/2024
0.1.12 667 2/8/2024
0.1.11 714 2/8/2024
0.1.10 702 2/8/2024
0.1.9 631 2/8/2024
0.1.8 734 2/8/2024
0.1.7 712 2/8/2024