Build Steps
- Updated2023-02-21
- 3 minute(s) read
Use the Build Steps dialog box to specify sets of actions to execute before and after you build a project. You can specify three types of actions: custom build, pre-build, and post-build actions.
![]() |
Note Refer to the Persistence of LabWindows/CVI Dialog Box Options topic for more information about where dialog box options are saved and what they affect. |
- Configuration—Specifies the configuration(s) to which the settings apply. The following configurations are listed by default:
- Debug—Settings apply to the default 32-bit debug configuration.
- Release—Settings apply to the default 32-bit release configuration.
- Debug64—Settings apply to the default 64-bit debug configuration.
- Release64—Settings apply to the default 64-bit release configuration.
- All Configurations—Settings apply to all configurations.

Note - Any custom configurations you create are also listed.
- If you access the Build Steps dialog box from the Add Configuration or Edit Configuration dialog boxes, LabWindows/CVI dims the Configuration option. LabWindows/CVI applies the changes you make in this dialog box to the configuration specified in the Add Configuration or Edit Configuration dialog box.
- Custom build actions—Actions that occur immediately before LabWindows/CVI starts dependency checking after you initiate a build.
- Pre-build actions—Actions that occur after LabWindows/CVI checks for dependencies and before it builds the target. Pre-build actions occur only when the target needs to be built.
- Post-build actions—Actions that occur after the target is built. Post-build actions occur only when a build is successful.
Actions can be any command supported by a Windows batch file. You can pass arguments, either hard-coded or special LabWindows/CVI variables, to the action. If you specify a batch file as an action, you must use the CALL command. Before any actions are executed, LabWindows/CVI sets the directory of the project as the current working directory.
LabWindows/CVI creates a batch file containing the actions for each step, and then runs the batch file. You can view the output of the build steps in the Build Output window.
LabWindows/CVI supports the following special variables in build steps:
| %CVIDIR% | Unquoted full path of the directory in which LabWindows/CVI is installed |
| %CVIPROJDIR% | Unquoted full path of the directory of the project file |
| %CVIPROJNAME% | Unquoted base name of the project file |
| %CVIPROJPATH% | Unquoted full path of the project file |
| %CVITARGETDIR% | Unquoted full path of the directory of the build target |
| %CVITARGETNAME% | Unquoted base name of the build target |
| %CVITARGETPATH% | Unquoted full path of the build target |
| %CVIBUILDCONFIG% | Unquoted name of the current build configuration |
| %CVIVXIPNPDIR% | Unquoted full path of the VXIPNP directory |
| %CVIIVIDIR% | Unquoted full path of IVI directory |
| %CVIWINDIR% | Unquoted full path of the Windows directory |
| %CVISYSDIR% | Unquoted full path of the Windows system directory |
| %CVIPUBDOCSDIR% | Unquoted full path of the LabWindows/CVI public documents directory (Users\Public\Documents\National Instruments\CVI) |
| %CVISHAREDDIR% | Unquoted full path of the LabWindows/CVI shared installation directory (<Program Files>\National Instruments\Shared\CVI) |
| %CVITARGETFILEVER% | Unquoted version string defined in the File Version option of the Version Info dialog box |
| %CVITARGETPRODVER% | Unquoted version string defined in the Product Version option of the Version Info dialog box |
Batch files handle the % character as a special character. For more information about how batch files interpret the % character, refer to the Microsoft Web site.
![]() |
Note If any action changes the current working directory, LabWindows/CVI does not reset the current working directory for subsequent actions. The current working directory is reset for each step. |