Macro Properties Dialog

Top  Previous  Next

The Macro Properties dialog is used to add new macros and modify existing macros.  To add a new macro, switch to the Macros pane, and click the Insert icon on the toolbar, choose Edit|Insert on the menu bar, or press Insert.  To edit an existing macro, click the properties icon on the toolbar, select View|Properties on the menu, or press Enter.

 

Macro

 

Macros replace a particular string in the project with another string.  Using macros, you can:

 

Make your project generic
Define common commands for use in projects
Use predefined commands that are available as part of Visual Build Pro
Create a generic project that can be used with variable parameters
Specify options for commands used in multiple project steps

 

Name: Required.  Used to reference the macro in the project steps or other macros.  Macros can contain any characters other than the left/right parenthesis, percent sign (%), or space.  Macro names are matched without case sensitivity.

 

Parameters: Specifies parameters that can be passed to the macro.  Parameters are separated by commas (optional).

 

Value: The value to replace a reference to this macro with.  If the macro has parameters, each parameter must be used at least once in the macro value.  Macros can reference other macros to 20 levels of nesting (although a macro cannot reference itself).  To reference a macro, place a percent sign (%) sign around the macro name (i.e., %DEVSTUDIODIR%).  If other macros are referenced, a tool tip shows the expanded macro value when the mouse cursor is held over the field.

 

Notes:

Bracket characters [ and ] normally denote a script expression to be inserted into a field; to insert literal brackets, use two bracket characters [[ or ]].
The percent sign character % is normally used around a macro name for its value to be expanded within the field; to insert a literal percent character, use two percent characters %%.
Ctrl+C copies the value without expanding macros or script.  To copy the expanded value (with all macros expanded) to the clipboard, type Ctrl+M.  Ctrl+Shift+M copies with macros and expanded and with script expressions evaluated.

 

Description: A comment describing the purpose of the macro (optional).

 

Add to environment variables: If this box is checked, the macro's value will be added to the environment variable for any external programs that are called in subsequent steps.

 

Macros can be used in most step fields and within other macros.  You can define your own macros, use existing environment variables, or use the predefined Visual Build Pro macros in your projects. 

 

Browse: Displays a file selection dialog for inserting a filename into a macro value.

 

Shell: Displays a popup menu for performing an operation on the currently selected filename or folder.  This provides a handy way to open a file in its associated application (Launch), view a file in the user-configured viewer (View), or to open a folder in Windows Explorer (Explore).