This functionality is only available for certain module packages. Info / Copyright

Executing or Loading Scripts

Simple scripts whose functions are to be executed once are to be run using the menu item of the same name. The attribute [Start] is used to identify this type of function. Scripts whose functions are to be available for a longer time have to be loaded. Other attributes are used here for identification.

Run scripts

Precondition:

You have created a simple script (with the [Start] attribute) in the C# program language or Visual Basic.Net.

  1. Select the menu items Utilities > Scripts > Run.

    The Select script file dialog is opened.
  2. Select a script with the File type CSharp (*.cs) or VB.NET (*.vb).
  3. 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.

  1. Select the menu items Utilities > Scripts > Load.

    The Select script file dialog is opened.
  2. Select a script with the File type CSharp (*.cs) or VB.NET (*.vb).
  3. 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.

  1. Select the menu items Utilities > Scripts > Unload.

    The Unload scripts dialog appears.
  2. Select the script from the Registered scripts list.
  3. 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