Macros Pane

Top  Previous  Next

The Macros pane is used to manage Visual Build Pro macros.  It is accessed by clicking on the Macros pane in the Step Panes, the Macros item on the View menu.  Macros provide a powerful capability that can be used to make projects more dynamic and generic.

 

Macros

 

There are four (4) types of macros, with one grid entry for each type:

 

Temporary macros are macros that exist only for the current Visual Build Pro instance.  They are assigned by passing in a VisBuildPro Project action, by adding them to the Temporary tab, or by creating them during a build in Set Macro step actions.  These can be useful for temporary values that are not needed beyond the processing of a build, or to pass in values required for a build.

 

Project macros are saved with the project file.

 

Global macros are global across all projects and are stored in VisBuildPro.macros file in the configuration files path.  Visual Build Pro comes with several built-in global macros and additional global macros can be created within Visual Build Pro or within a build using the Set Macro action.

 

System macros are the Windows environment variables plus several built-in macros and tools.  System macros cannot be changed by the user.

 

If the same macro exists for more than one type of macro, the following order of precedence will be used to determine which macro to use (from highest to lowest):

 

Temporary
Project
Global
System (Environment variables take precedence over predefined Visual Build Pro system macros)

 

Macro overrides can be very useful; for instance, a project macro could be defined as a default value, but a temporary macro passed on the command-line when building the project.  This temporary macro would override the value defined for that project macro.

 

Macros can be cut, copied and pasted from within the Macro tab and from one Visual Build Pro instance to another.  A macro can be renamed by clicking twice on its name or pressing F2.  Macro names are not case sensitive.