Simple scripts whose function is supposed to be executed once, are executed via the Run command in the Backstage view Extras. The attribute
Run scripts
Precondition:
You have created a simple script (with the
- Select the following commands: File > Extras > Command group Extensions > Interfaces > Command group Scripts > Run.
- Select a script in the subsequent dialog with the File type CSharp (*.cs) or VB.NET (*.vb).
- Click [Open].
The script is executed.
If an error occurs during the execution of a script it is logged in the System messages.
Load scripts
Precondition:
You have created a more complex script (e.g. with you own action) in the C# program language or Visual Basic.Net. In more complex scripts, the attributes [DeclareEventHandler], [DeclareAction] or [DeclareMenu] used.
- Select the following commands: File > Extras > Command group Extensions > Interfaces > Command group Scripts > Load.
- Select a script in the subsequent dialog with the File type CSharp (*.cs) or VB.NET (*.vb).
- Click [Open].
The script is loaded.
If an error occurs during the loading of a script, it is logged in the System messages. If a script has been loaded once, it will be automatically loaded next time the program is started.
Unload scripts
Precondition:
You have loaded a script.
- Select the following commands: File > Extras > Command group Extensions > Interfaces > Command group Scripts > Unload.
- In the subsequent dialog select the script from the Registered scripts list.
- Click [OK].
The script is deactivated.
The next time the program is started, the unloaded script is no longer automatically registered in Eplan.
See also