In This Topic
You can run scripts in Eplan without having licensed the Eplan API. Scripts are executable program code, written in C# (language version C# 13, *.cs files) or Visual Basic.NET (*.vb files). Scripts always exist as source code. When you start a script, it will be loaded into the system, compiled and then executed.
For scripting, go to the ribbon item File > Extras > Interfaces. You will find the category Scripts.
After calling File > Extras > Interfaces > Scripts > Run, a file dialog appears and a script file to execute can be selected.
Scripts are always compiled with the Roslyn .NET compiler.
Assemblies that can be accessed
The following .NET Core assemblies can be used in scripts:
- Microsoft.Win32.Registry
- mscorlib
- System.Collections.Concurrent
- System.Collections.NonGeneric
- System.Collections.Specialized
- System.Collections
- System.ComponentModel.EventBasedAsync
- System.ComponentModel.Primitives
- System.ComponentModel.TypeConverter
- System.ComponentModel
- System.Console
- System.Core
- System.Diagnostics.FileVersionInfo
- System.Diagnostics.Process
- System.Diagnostics.StackTrace
- System.Diagnostics.TextWriterTraceListener
- System.Diagnostics.TraceSource
- System.Drawing.Primitives
- System.Drawing
- System.IO.Compression.FileSystem
- System.IO.Compression.ZipFile
- System.IO.Compression
- System.IO.FileSystem.AccessControl
- System.IO.FileSystem.DriveInfo
- System.IO.FileSystem.Watcher
- System.IO.IsolatedStorage
- System.IO.MemoryMappedFiles
- System.IO.Pipes
- System.Linq.Expressions
- System.Linq.Parallel
- System.Linq.Queryable
- System.Linq
- System.Net.Http
- System.Net.HttpListener
- System.Net.Mail
- System.Net.NameResolution
- System.Net.NetworkInformation
- System.Net.Ping
- System.Net.Primitives
- System.Net.Requests
- System.Net.Security
- System.Net.ServicePoint
- System.Net.Sockets
- System.Net.WebClient
- System.Net.WebHeaderCollection
- System.Net.WebProxy
- System.Net.WebSockets.Client
- System.Net.WebSockets
- System.ObjectModel
- System.Private.CoreLib
- System.Private.Uri
- System.Private.Xml.Linq
- System.Private.Xml
- System.Resources.Writer
- System.Runtime.CompilerServices.VisualC
- System.Runtime.InteropServices
- System.Runtime.Serialization.Formatters
- System.Runtime
- System.Security.AccessControl
- System.Security.Claims
- System.Security.Cryptography
- System.Security.Principal.Windows
- System.Text.Json
- System.Text.RegularExpressions
- System.Threading.Tasks.Parallel
- System.Threading
- System.Xml.LINQ
- System.Xml.XPath.XDocument
- System.XML
- System
The following
.NET Windows Desktop assemblies can be used in scripts:
- Microsoft.Win32.SystemEvents
- System.CodeDom
- System.Configuration.ConfigurationManager
- System.Diagnostics.EventLog
- System.Diagnostics.PerformanceCounter
- System.Drawing.Common
- System.Security.Permissions
- System.Threading.AccessControl
- System.Windows.Extensions
- System.Windows.Forms.Design
- System.Windows.Forms.Primitives
- System.Windows.Forms
Also these Eplan .NET 8 assemblies are referenced by default:
- Eplan.EplApi.BaseNetu
- Eplan.EplApi.AFNetu
- Eplan.EplApi.GuiNetu
- Eplan.EplApi.MasterDataNetu
- Eplan.IdentityClient.AuthentificationNetu
- Eplan.IdentityClient.TypesNetu
There is no way to reference additional assemblies (.NET, Eplan or other providers) for scripting!
The feature to reference other assemblies is only available with the "Eplan API Extension" license and only for offline applications, add-ins and add-ons.