Back to Blog
June 22, 2026 Vidhasri Team

How to Build a Custom EPLAN Add-in with C# API: A Step-by-Step Guide

A complete beginner-to-working guide for building your first EPLAN Electric P8 add-in using the C# API — covering project setup, IEplAddIn, Actions, deployment, and common pitfalls to avoid.

eplan api c# eplan add-in eplan automation engineering automation

How to Build a Custom EPLAN Add-in with C# API: A Step-by-Step Guide

EPLAN Electric P8 is a powerful electrical CAD platform — but its real power is unlocked when you extend it with custom automation using the EPLAN API.

The EPLAN API is a .NET-based (C#/VB.NET) programming interface that lets you build custom add-ins that run inside EPLAN itself. With it, you can:

  • Automate repetitive design tasks (device placement, wire numbering, labeling)
  • Generate schematics programmatically from external data sources (Excel, databases, ERP systems)
  • Run custom validation and project checks
  • Export data in custom formats for production, ERP integration, or reporting
  • Build interactive tools for engineers (custom dialogs, wizards)

At Vidhasri Technology, the EPLAN C# API is central to what we do. This guide will walk you through the fundamentals of building your first EPLAN add-in — from environment setup to deploying a working tool.


Prerequisites

Before writing any code, ensure you have the following:

RequirementDetails
EPLAN Electric P8Version 2022 or 2023 recommended (API is version-specific)
Visual Studio2019 or 2022 (Community edition is sufficient)
.NET Framework4.8 (EPLAN P8 2022/2023 target framework)
EPLAN API Reference DLLsLocated in your EPLAN installation folder
Basic C# knowledgeObject-oriented C# — at least beginner level
EPLAN Platform LicenseSome API features require an EEC One license (check with EPLAN)

Step 1: Set Up Your Visual Studio Project

1.1 Create a New Class Library Project

  1. Open Visual Studio → Create a new project
  2. Select Class Library (.NET Framework)
  3. Name it: VidhasriEPLANAddIn (or your preferred name)
  4. Set target framework: .NET Framework 4.8
  5. Click Create

1.2 Add EPLAN API References

The EPLAN API DLLs are located in your EPLAN installation directory. The default path is:

C:\Program Files\EPLAN\Platform\2.9\Bin\

(Adjust version number as needed)

Right-click your project in Solution Explorer → Add ReferenceBrowse → navigate to the EPLAN Bin folder and add these DLLs:

Eplan.EplApi.ApplicationFramework.dll
Eplan.EplApi.Base.dll
Eplan.EplApi.DataModel.dll
Eplan.EplApi.MasterData.dll

Set Copy Local = False for all EPLAN DLLs — they must not be copied to your output folder. They are always loaded from the EPLAN installation directory at runtime.


Step 2: Create the Add-in Entry Point

Every EPLAN add-in must have a class that implements IEplAddIn. This is EPLAN’s way of recognizing your DLL as a valid add-in.

using Eplan.EplApi.ApplicationFramework;
using Eplan.EplApi.Base;

namespace VidhasriEPLANAddIn
{
    public class AddInModule : IEplAddIn
    {
        public bool OnInit()
        {
            // Called when EPLAN starts and loads the add-in
            // Register your actions here
            return true;
        }

        public bool OnInitGui()
        {
            // Called after the GUI is initialized
            // Safe to add menu items or ribbons here
            return true;
        }

        public bool OnRegister(ref bool isRegistered)
        {
            // Registration information
            isRegistered = true;
            return true;
        }

        public bool OnUnregister()
        {
            return true;
        }

        public bool OnExit()
        {
            // Called when EPLAN closes
            return true;
        }
    }
}

Step 3: Create Your First Action

In EPLAN, an Action is the unit of executable code. Each function you want to expose to EPLAN (via menu, ribbon, or API call) is implemented as an Action class.

Here is a minimal action that shows a message box:

using Eplan.EplApi.ApplicationFramework;
using Eplan.EplApi.Base;

namespace VidhasriEPLANAddIn
{
    [IsIdentifiedByName("VidhasriHelloWorldAction")]
    public class HelloWorldAction : IEplAction
    {
        public bool Execute(ActionCallingContext actionCallingContext)
        {
            MessageBox.Show("Hello from Vidhasri Technology EPLAN Add-in!");
            return true;
        }

        public void GetActionProperties(ref ActionProperties actionProperties)
        {
            // Define the action's properties
        }

        public bool Enabled(string menuItemIDString, 
                           ref int iDrawingBitSet)
        {
            return true;
        }
    }
}

The [IsIdentifiedByName] attribute registers this action with the EPLAN action framework under the given name. You will use this name to call it from menus or other actions.


Step 4: Deploy the Add-in

4.1 Build the DLL

Build your project in Release mode. This produces VidhasriEPLANAddIn.dll in your bin\Release folder.

4.2 Register with EPLAN

Copy the DLL to your EPLAN add-in directory. The typical path is:

C:\Users\[YourUser]\AppData\Roaming\EPLAN\Platform\{Version}\AddInManager\

Or use the EPLAN Add-in Manager (Tools → Add-in Manager) to register the DLL manually.

4.3 Restart EPLAN

After registration, restart EPLAN. Your add-in should load, and you should see your menu item.


Common Pitfalls and How to Avoid Them

Pitfall 1: API Version Mismatch

The EPLAN API is strictly version-specific. An add-in compiled against EPLAN 2022 DLLs may not load in EPLAN 2023. Always compile against the exact version your clients are using.

Solution: Maintain separate branches or build configurations for each supported EPLAN version.

Pitfall 2: Forgetting to Lock Objects Before Modification

EPLAN uses an internal lock mechanism. If you modify a device or connection without acquiring the lock, changes may silently fail or corrupt the project.

Solution: Always call obj.LockObject() before modifying, and obj.UnlockObject() after.

Pitfall 3: Not Handling Multilingual Projects

EPLAN supports multilingual text. Property values may be language-dependent. Always specify the language when reading text properties.


What Vidhasri Technology Builds with the EPLAN API

Here are examples of real add-ins we have built for clients:

Add-inFunction
Excel-to-Schematic GeneratorReads a device list from Excel and places all devices on EPLAN pages automatically
PLC Address Auto-AssignerScans all I/O symbols and assigns PLC addresses based on a defined addressing schema
Custom BOM ExporterGenerates a BOM in a client-specific Excel format with part prices and lead times
Project Standards CheckerRuns 40+ custom validation rules beyond EPLAN’s built-in checks
Macro Placement WizardA custom dialog that lets engineers select a circuit type and auto-places the macro with all properties filled

If you need any of these — or a custom add-in unique to your workflow — we build it.


Conclusion

The EPLAN C# API transforms EPLAN from a powerful CAD tool into a fully programmable engineering platform. Once you understand the object model and action framework, the possibilities for automation are virtually unlimited.

Whether you want to save hours per project on repetitive tasks, integrate EPLAN with your ERP or PLM system, or build tools that enforce your engineering standards automatically — the C# API is how it is done.

Ready to build your first EPLAN add-in or need one built for you? Get in touch with our team — we are happy to help.

Ready to optimize your engineering workflows?

Get in Touch
Service Deep Dive

The Problem

Our Solutions

    Key Deliverables