Testing a Script

You can test your PreProcess/PostProcess or PreExport/PostExport script before deploying it. This allows you to run the script based on a Job Log file you specify.

After entering a script in the Script Editor's PreExport or PostExport tab, or the PreProcess or PostProcess tab, click the Compile/Run button and, if your script is compiled without any errors, click the OK button in the Run Script dialog box that appears.

The Run Script dialog box includes the following settings:

Entry Point

  • PreExport(Log as JobLog, Project ID as Integer): Specifies that you want to run the PreExport function.

  • PreExport(Log as JobLog, Project ID as Integer): Specifies that you want to run the PreExport function.

  • PostExport(Log as JobLog, Project ID as Integer, ExportCompleted as Boolean): Specifies that you want to run the PostExport function.

  • PreProcess(Log as JobLog): Specifies that you want to run the PreProcess function.

  • PostProcess(Log as JobLog): Specifies that you want to run the PostProcess function.

Parameters

  • Job ID: Displays the Job ID of the job log to which the script will be applied. Note: To select a job ID, click its name in the table or select from the Select Job ID drop-down list.

  • Project ID: Specifies the Project ID to pass to the PreExport or PostExport Function. Note: This only needs to be changed if you are using the Multiple Projects per Job option in the Process settings. Otherwise leave the value at 1.

  • Export Completed: Allows you to specify that the ExportCompleted variable is forced to true, if checked, and false, if unchecked, so any code checking the contents of the variable can be fully tested, even if an export fails.

  • Run: Runs the selected function.

  • Show Log: Displays the contents of the selected log file. Note: After the function runs, you may wish to click this button to view the log file to make sure that the function modified the log file in the desired way.

  • Cancel - Closes the dialog box and returns to the Script Editor page.

 

 

 

 

(c) 2023 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support