In EPLAN, you have the capability of executing scripts. Scripts are small executable program codes that are written within EPLAN in the C# or Visual Basic.Net programming languages. They always exist as source code files (file extension *.cs or *.vb). In EPLAN these scripts access the API interface without you having to also license the EPLAN API.
When you start a script, it is loaded in the system, compiled and then executed. The following scripts are available:
- "Simple" scripts whose functions are executed once and can be started from the menu item Run.
- Other scripts like the ones that make your own actions or menu items available are registered for a longer time in EPLAN and executed via the menu item Load. To deactivate scripts of this kind, go to the menu item Unload.
Scripting in EPLAN offers you the following options:
- Using a script you can execute a function once.
- Scripts can also be started from a command line. This allows you to add more parameters to the script as well.
- You can use scripts to execute automated EPLAN actions.
- You can use scripts to read out or change settings.
- Scripting also allows you to add new actions to EPLAN. A new action can then be integrated as a menu item or a button in a toolbar in EPLAN.
- Scripts can also be written to react to specific EPLAN events. A script can even respond to the start or closing of the program.
The Automated processing function (under Utilities) also uses scripts. Here you can use some of the available scripts to automate activities in the individual areas of project editing (Back up data, Print, etc.).
Notes:
- In a script you can use all classes of Microsoft.Net assemblies: System, System.XML, System.Drawing, System.Windows.Forms, the EPLAN API assemblies Eplan.EplApi.Base and Eplan.EplApi.ApplicationFramework.
- You cannot reference additional assemblies in a script(.Net Framework, EPLAN or other providers).
See also
Simple Scripts with EPLAN Actions