The Define Variable action allows you to define a new FinalBuilder variable during the execution of the project. Project variables are supported.

This is not the recommended way to create FinalBuilder variables for normal use. See the Variables overview topic for details.

Define Variable

Variable Name

Variable Name

Choose a name for your new variable. FinalBuilder will warn you (but not stop you) if you type the name of a preexisting variable.

Default Value

Choose a default value for your new variable. If the 'Set default value if variable already defined' box is checked, this will be the new default value for a preexisting variable, as well.

Expand variables before assigning default value

If you check this box, then variables you enter in the Default Value box (ie %MyVariable%) will be expanded to their current values before being assigned as the default value for the new variable.

If you want a variable which automatically evaluates other variables each time it is referenced (like a function), you can create a Macro variable (see below.) If you create a macro variable, do not check the Expand variables before assigning box.

Variable Options

Make Available as Environment Variable

If checked, the new variable will be available as an environment variable.


The Is Macro flag forces FinalBuilder to re-evaluate the variable whenever it's referenced during the build, otherwise the value of the variable is evaluated when the build starts and that value is used throughout the build.  An Is Macro variable is like a function - its value cannot be set during the build using the Set Variable action or any other means.


If checked, the new variable will be persistent (the value will be saved between builds).


The action can be set to fail if the variable is already defined (Variables defined during the build are persistent, so if you save a project file after defining a new variable, the new variable will remained defined in the Variables window.)

If the action is set to ignore preexisting variables, it can be set to update the default value. This is the only part of the preexisting variable which can be updated by the action - it is impossible to change any other properties of the variable.

If the "update default value" box is not checked, the action will do nothing if the variable already exists.

If the variable is persistent, then the "set default value if variable already defined" has no effect.

  • No labels