How to set up a CAD Extension project using Visual Studio Community 2022.
Prerequisites
The following software must be installed before starting an extension project:
Required:
- Visual Studio Community 2022 or greater, available for download from Microsoft.com.
- Epicor CPQ Desktop Tools, available for download from the admin > infrastructure > tools menu in your configurator.
- Your licensed CAD software we support.
Ensure the operating system of the output builder meets our system requirements and minimum versions.
Legacy Installations
- If you are upgrading or modifying an existing project created before Fall 2022, you'll need to make 2 changes: update the filepath and the framework.
- If this is a new install, proceed to the next "Setup" section.
1. Update legacy filepath
If you've created an extension project before 2022, those projects were stored in – and refer to files in – an old location. New project filepaths must be updated to point to a new location. Simply replace the legacy "KBMax" characters in the path with "Epicor". For example:
From
%homepath%\AppData\Local\KBMax
%homepath%\AppData\Roaming\KBMax%homepath%\AppData\Roaming\KBMax3To
%homepath%\AppData\Local\Epicor
%homepath%\AppData\Roaming\Epicor%homepath%\AppData\Roaming\Epicor32. Update legacy.Net 4 framework to .Net 6 framework
If your projects were created on Microsoft's .Net 4 framework, they need to be updated to the new .Net 6 framework at the time of this release. Contact Customer Support for questions regarding this upgrade.
Setup
-
Install the Visual Studio extension.
We've built a template to help you start a new Epicor CPQ CAD Extension project. In File Explorer, go to:C:\Users\<Your User>\AppData\Roaming\Epicor3\Epicor CPQ Desktop Tools\Double click onVSIXKBMaxRuleExtension.vsixto install.
-
Create and define a new project.
Open Visual Studio > Start a New Project
-
Type a Name for the Project.
-
From Templates > Visual Basic, select "Epicor CPQ Rules Extension". If this is not listed, revisit step 1 above.

-
In the Solutions Explorer, delete any legacy projects that may be listed from previous installations.

-
Begin adding references to your project.
In the Solution Explorer, right click "Dependencies", and select "Add Project Reference".
-
Add foundation .dll references.
At a minimum, any extension project requires reference to a few foundation .dlls that are supplied by Epicor CPQ. These files were created when the Output Builder software is installed. Browse to:C:\Users\<Your User>\AppData\Roaming\Epicor3\KBMax CPQ Desktop Tools\
and add the following dll references to your project:-
KBMax.Models.dll(Required) -
KBMax.Drivers.Core.dll(Required) KBMax.Extensions.dll(Required)-
NewtonsoftJson.dll(Optional)For the Models and Extensions dll files, a help file can be downloaded here: Extensions API.chm. For the Drivers file, no documentation is available: this file is for Epicor internal use.
-
-
Add platform-specific .dll references.
For optional CAD references, browse toC:\Users\<Your User>\AppData\Roaming\Epicor3\KBMax CPQ Desktop Tools\
and add the following dll references appropriate to your CAD platform:-
SolidWorks:
PdmwInterop.dllSolidWorks.Interop.sldworks.dll- SolidWorks.Interop.swconst.dll
-
AutoCAD:
Autodesk.AutoCAD.Interop.Common.dll Autodesk.AutoCAD.Interop.dll
-
SolidWorks:
-
Ensure you are based on the correct .NET framework.
Right-click on the Project and go to “Properties”. Click on the "Application" tab and ensure the "Target framework" field is set to “.NET 6.0”.
-
In this same window, you can optionally set the "Root namespace" for your project. This namespace will appear as part of the extension's name when it is in-use on your builder workstations.
-
On the “Compile” tab, verify the “Build Output Path” points to the location of the Output Builder files.

-
If you wish to debug, a link to the Epicor CPQ OutputBuilder must be added.
Go to the “Debug” tab and select “Executable” as the “Launch” option. Then browse toC:\Users\<Your User>\AppData\Roaming\Epicor3\KBMax CPQ Desktop Tools\
and select'KBMax.OutputBuilder.exe'
-
Program your business logic in the VB.NET language.
To help you get started, we have a simple example script available in the documentation.
-
Deploy your project.
To deploy the project, click Build > Build Solution from the menu bar. A .dll file will be generated with your project name in the 'C:\KBMAX CPQ\Extensions\Rules\' folder. This is your custom extension, ready for use!
-
Save your custom extension .dll file to the Epicor CPQ cloud, so it will be automatically distributed to all your output builders.
Launch your Epicor CPQ Administrator Interface with your web browser, and browse to the Resources > Templates folder. Browse to the "Extensions\Rules" subfolder. Copy your deployed project's .dll into that folder.
-
Confirm the .dll is automatically distributed to your output builders.
Sit down at the keyboard of any output builder machine, and click the icon in the tooltray to open the output builder window. Click "About" to open the info screen of the builder. Below the version information, you should see a list of "Installed Extensions". In that list, you should see the extension/s you wrote and saved to the templates folder. Updated extensions are pushed to every output builder as they are required: an extension may not appear immediately on a builder if that builder does not need it.
See Also
Using JSON Serializer/Deserializer to pass data to CAD Extension
You can pass complex data – beyond simple text and numbers -- to the CAD Extension through a technique called serialization.
Output Builder Events
List of Builder Events and when they are executed.
List of CAD Events, when they are executed, and the CAD API Objects available to them.
AutoCAD Events & Functions
AutoCAD, like other CAD systems, can also be automated through an Epicor CPQ CAD Extension.
SolidWorks PDM Professional Events & Functions
A list of functions and events available when building a CAD Extension for SolidWorks PDM Professional.