Creating a project in Visual Studio
Microsoft Visual Studio (version 2022) is available in different versions:
-
Visual Studio Community
-
Visual Studio Professional
-
Visual Studio Enterprise
The free Community Edition is perfectly adequate for scripting. The license terms must be observed here.
The download can be found at https://visualstudio.microsoft.com.
The .NET desktop development workload must be activated for the development of scripts. This component can also be installed later using the Visual Studio Installer program.
It is recommended to start Visual Studio in the English interface. This makes it easier to understand the documentation on software functions or discussions in communities.
The language can be changed under Tools > Options... > Environment > International Settings > Language.
Now we start the application and create a new project. There are several ways to do this:
- via Create a new project... on the start screen
- via File > New > Project..., if Visual Studio is already open
Several project templates are available, depending on the version of Visual Studio installed and the range of functions. We select C# as the language, Windows as the platform and Library as the project type. Now we select Class Library (.NET Framework) and click on Next.
We assign EPLAN Scripting Project as the project name and name of the project folder and define a desired storage location. We leave the Place solution and project in the same directory option deactivated and select the .NET Framework 4.8.1 valid for EPLAN 2025 as the target framework.
Press the Create button to create the files and open the project. Now we can already see the first lines of code. However, it is important for us to load all EPLAN-relevant data first. To do this, we display the Solution Explorer via View > Solution Explorer if it is not visible.
The structure of the Solution Explorer is as follows:
- Name of the Visual Studio solution (can consist of several projects)
- Name of the project
- Properties
- References
- Program files (we can also create folders here)
We can minimize the navigators in Visual Studio to the margins. The pin symbolizes whether or not the navigator is automatically minimized after leaving the mouse.
To be able to use EPLAN functionalities in the program code, we need to load some files. To do this, we right-click on References and select Add Reference.
We now switch to the Browse tab and select the EPLAN installation folder (e.g. C:\Program Files\EPLAN\Platform\2026.0.1\Bin
) using the button of the same name. Here we select the following files:
- Eplan.EplApi.AFu.dll
- Eplan.EplApi.Baseu.dll
- Eplan.EplApi.Guiu.dll
- Eplan.EplApi.MasterDatau.dll
- Eplan.EplApi.MasterDatau.dll
- Newtonsoft.Json.dll
In addition to the EPLAN DLL files, the following assemblies from the framework are also permitted in scripting:
-
System
-
System.Drawing
-
System.Net.Http
-
System.Windows.Forms
-
System.XML
We add the links via the Assemblys tab.
We remove links that are not permitted via the context menu. The References shown in should now be visible.
Now we come to the actual program file Class1.cs. We rename this to 01_Start.cs. The ending *.cs stands for C#. For a better overview, we organize the script files into folders. Right-click on Project > Add > New Folder to create the folder 01_FirstSteps.
We save the project folder with File > Save All.