Simple Scripts with Eplan Actions

You also have the option of integrating automatic actions in a simple script. Using these Eplan actions you can automatically run different program functions (e.g. Back up data, Print, etc.).

After the class, the [Start] attribute and the function, you have to specify the parameter set for the action in the script and then run the action via CommandLineInterpreter().Execute().

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

public class <ScriptName>
{

     [Start]
     public void <FunctionName>
     {

           ActionCallingContext <ActionName>Context = new ActionCallingContext ();
           <ActionName>Context .AddParameter("<ActionParameter1>","<Value>");
           <ActionName>Context .AddParameter("<ActionParameter2>","<Value>");
           ...
           new CommandLineInterpreter().Execute("<ActionName>",<ActionName>Context);
           return;

     }

}

Tip:

The command Automated processing (command path: File > Extras > Command group Extensions > Interfaces > Command group Automated processing > Automated processing) uses simple scripts to automate actions. You can use these scripts to create new scripts. Before you can run the scripts (command path: File > Extras > Command group Extensions > Interfaces > Command group Scripts > Run), you have to remove the AutoTreat function for the parameter String ProjectName and the line in which this parameter is used.

See also