Script Output Template

A script can create multiple output series.  Each output series must have a unique name.  The output series are specified in the output template.  The "seq" determines the order that this parameter is displayed to the user.  Outputs are displayed to the user in increasing order of their sequence.  A user may choose the modify the name of an output.  The "name" should describe the content of the output, and not be specific to a certain input file.  Outputs are declared in the associative array OutputTemplate.

OutputTemplate:
           {
              ExampleOutputA: {seq: 1, name: "First Example Output"},
              ExampleOutputB: {seq: 2, name: "Second Example Output"},
           },

When the script is run, EMGworks will transparently create an Output member in the namespace which can be assigned to from within the Calculate function, as seen below.

 

// finished computation, assign output

MYS.Output.ExampleOutputA = new Series();

 

Each and every output in the script must be initialized in this manner.  Use the above method if the output will be assigned to point by point, or set the output equal to another series in the script.  If all outputs are not assigned to prior to the script completing, the calculation will not complete.