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

Scripts with New Actions

You can load and unload scripts in EPLAN. If you do this, the start function is not executed, but rather special functions are registered in EPLAN. You can insert a new action or a menu item in EPLAN, or you can have functions registered in order to have them react to special EPLAN events.

To insert a new action in the program, the function in the script has to be identified by the [DeclareAction] attribute. Using the parameter of the [DeclareAction()] attribute, you can specify the name of the new action in EPLAN.

The overall structure of such a simple C# script thus looks like this:

public class <ScriptName>
{

     [DeclareAction("<ActionName>")]
     public void <FunctionName>
     {

           //<Enter your code text here>
           return;

     }

}

After a corresponding script (with [DeclareAction]) is loaded using the menu item Load, the new action can be used like any other action in EPLAN. It can, for example, be called up via the command line or it can be added to a menu item or a button in a toolbar.

As soon as a script has been loaded once, it will automatically be loaded and ready for use the next time you start EPLAN. To deactivate a script of this kind, go to the menu item Unload.

See also