Macro Designer

 

 

 

Macro Designer

 

The Macro Designer is used to assist in generation of macro commands for macro-enabled controls.

 

In order to launch the Macro Designer, place the mouse cursor inside a macro-enabled control and press F2 from the keyboard. The Macro Designer form can be opened from the Job, Job Step, and Impeller designers.  Any text that is currently inside the selected control will be copied to the macro designer.

 

The Macro Designer form is split into 2 sections.  On the left is a tree view containing nodes representing the macro commands which are available to the current control.  Double-Clicking on a node will generate a basic macro command in the macro editor control to the right.  All macro commands are divided into 3 categories.

Macros: Contains a list of all macro commands accessible to the pasUnity software.

Parameters: Contains a list of all parameters defined up to the point of the chosen control.  For example, opening the macro designer from a job step will list all parameters that have been declared on the job, all parameters declared in all impellers, and the parameters declared only in parameter job steps that appear at or before the selected job step.  Opening the macro designer from an impeller, however, will only list the parameters declared on the job and the parameters declared only on the selected impeller.  Opening the macro designer from a job will only list the parameters declared on the job.

Tokens: Contains a list of system-level token commands relevant to the job, job step, or impeller.  These can be used for tasks such as retrieving the system date, system user name, or source file name.

On the right side of the form is the macro editor control.  It will assist with the creation of macro commands by using color-coding to separate individual commands for improved readability, and turns pink when a macro block has not been closed with the appropriate end character.  See Macro Expressions for more information on the syntax and parameters for macro commands.

 

Below the macro editor control is a Save button and a Cancel button.  Selecting cancel will close the form without saving any changes.  The save button will copy the text from the macro editor control to the macro-enabled control from which the form was first launched.  If an error has been detected in the macro command, the background will remain pink and the save button will be disabled until all errors have been corrected.

 

NOTE: The Macro Designer is context sensitive and will only show you macros, parameters, and tokens that it knows to be in scope for the context in which it is opened.  The contents of the tree will vary depending on where you are in the job designer.  While the Macro Designer is very intuitive it does not scan script code (such as Managed Code or PowerShell job steps) to detect if any parameters are being manufactured at run time.

 


Copyright © 2024 pasUNITY, Inc.

 

Send comments on this topic.