Eplan Platform API
Eplan API / User Guide / Development environment / Eplan .NET API
In This Topic
    Eplan .NET API
    In This Topic

    Eplan API was created using the Microsoft® .NET Framework 4.8.1 technology. Starting with Eplan version 2027, we provide also a second parallel Eplan API based on the Microsoft® .NET 8. technology.

    We recommend using Microsoft Visual Studio 2022 to develop applications with the Eplan API. It should also work with other development environments, though it has not been tested with other IDEs than the Microsoft Visual Studio 2022. 

     

    To start a new Eplan API project in Microsoft Visual Studio 2022, select File > New > Project... in the ribbon. In the Create a new Project dialog, first select the programming language you want to use (C#, Visual Basic, or C++). If you decide to use C#, please choose between .NET Framework 4.8.1 and .NET 8.

    Next step is to decide what type of application you want to write:

    Creating an add-in

    • For an add-in, you either select a "Class Library" project or you use the Add-in Wizard provided by Eplan.
    • The procedure for using the Add-in Wizard is described in the topic "Creating an add-in in Visual Studio".
    • If you want to create an add-in without using the wizard, simply add the references to the API assemblies.
    • At a minimum, you must reference the following DLLs:
      • .NET Framework 4.8.1Eplan.EplApi.AFu.dll  and  Eplan.EplApi.Baseu.dll 
      • .NET 8: Eplan.EplApi.AFNetu.dll  and  Eplan.EplApi.BaseNetu.dll 
    • Read more about creating add-ins in the topics below "Add-ins".
    • In your project settings (for example in Visual Studio) under Configuration Properties > Debugging add the  w3u.exe  as startup program (or  eplan.exe  with the  Variant  parameter) and make sure the created DLL is copied into the Eplan platform  bin  folder after building it.

     

    Creating an offline application

    • For an offline program, for example, create a new Windows Application project and proceed as described in the topic "Using Eplan API assemblies in other processes".
    • Make sure that a path is set to the Eplan platform  bin  directory or the working directory of your code project is set respectively, otherwise the corresponding DLLs may not be found.

     

    Preconditions of using all Eplan API features

    To use Eplan Electric P8 with its full range of API features, the ASP.NET Core Runtime must be installed because remoting and web services depend on this runtime.

    If ASP.NET Core Runtime is not installed at all, you can still start Eplan Electric P8, but you will receive a warning and an additional system message stating that remoting and web services are currently unavailable due to the missing ASP.NET Core Runtime as soon as you turn on remoting or try to start the web services.

    If ASP.NET Core Runtime is installed, but the version is not compatible with the .NET Desktop Runtime, you will receive a note as system message with troubleshooting instructions.
    To ensure that the two runtimes are compatible with each other, the following conditions must be met:

    1. The ASP.NET Core Runtime major version number must match the version number of the installed .NET Desktop Runtime.
    2. The ASP.NET Core Runtime patch version number mustn't be higher than the .NET Desktop Runtime patch version number.
    To avoid incompatibilities, it is recommended that you install both the .NET Desktop Runtime and the ASP.NET Core Runtime in version 8 with the latest patch.

     

    Remarks

    Working with an older Eplan API requires a suitable environment for this version of the framework. For example version 2.8 of Eplan API was developed for the Microsoft .NET Framework 4.5.2. 

    Make sure that you don't mix up Eplan API assemblies that use different frameworks!