Creating a new add-in

Estimated reading: 2 minutes 418 views

In Visual Studio, create a new .NET Framework C# Class Library project targeting the required framework version.

Creating a new C# class library in Visual Studio

Once the project is created, go to project references and add a new reference to Bexel.API library which is located in the root installation directory of Bexel Manager (default: C:\Program Files\BEXEL\Bexel Manager 24\Bexel.API.dll).

Adding a reference to Bexel.API.dll

Create a new class and implement the IExternalApplication interface located in namespace Bexel.API which is the root namespace for all API classes and interfaces.

Implementing IExternalApplication interface

The OnStartup and OnShutdown methods are automatically called up by the host application (i.e. Bexel Manager) once the add-in is successfully detected and loaded. Use the context object passed by the host app to initialize the UI part of the add-in.

The following command creates a button named “My Addin Button” located in “My Addin Group” on the default add-ins tab in the application’s ribbon. Custom named tab can also be specified. An event handler is registered on a button click to display the total element count of the currently loaded project to the user.

Registering UI components and writing add-in logic
Sharing is caring

Creating a new add-in

Or copy link

IN THIS SECTION: