Inventor.AddinTemplate
0.1.11
See the version list below for details.
dotnet new install Inventor.AddinTemplate::0.1.11
Inventor Addin Template
Overview
The goal of this template is to make creating 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 latest version of template can be installed from NuGet.org using the dotnet CLI.
dotnet new install Inventor.AddinTemplate
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.
-
.NETFramework 4.7.2
- Inventor.InternalNames (>= 0.1.1)
- stdole (>= 17.8.37221)
- System.Resources.Extensions (>= 8.0.0)
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.6 | 77 | 11/3/2024 |
1.0.6-beta0002 | 60 | 11/3/2024 |
1.0.6-beta0001 | 64 | 11/3/2024 |
1.0.5 | 2,756 | 2/23/2024 |
1.0.3 | 776 | 2/15/2024 |
1.0.2 | 596 | 2/14/2024 |
1.0.1 | 727 | 2/10/2024 |
1.0.0 | 551 | 2/9/2024 |
0.1.14 | 660 | 2/8/2024 |
0.1.13 | 716 | 2/8/2024 |
0.1.12 | 688 | 2/8/2024 |
0.1.11 | 760 | 2/8/2024 |
0.1.10 | 729 | 2/8/2024 |
0.1.9 | 666 | 2/8/2024 |
0.1.8 | 766 | 2/8/2024 |
0.1.7 | 736 | 2/8/2024 |