Pre/Post Build Actions Page (C Code Generation Properties Dialog Box)
- Updated2023-02-21
- 3 minute(s) read
Requires: C Generator
Use this page of the C Code Generation Properties dialog box to specify VIs for LabVIEW to execute before or after the build.
This page includes the following components:
- Execute VI before build—Includes a VI that executes before the build. Make sure the VI you want to include is under My Computer in the LabVIEW project.
When you place a checkmark in this checkbox, the Select Project File dialog box appears. Select a VI from this dialog box with a connector pane that matches the pre-build template VI. If you do not have a VI previously generated from the pre-build template, use the Generate VI button to execute a VI before the build.
For an example of a pre-build VI with the correct connector pane, refer to the Sample Pre Build Action VI in the labview\examples\project\pre and post build\sample pre and post build.lvproj.
Open example
Find related examples
If the pre-build VI returns an error before a build, the build does not continue, and the Build Status dialog box appears.- VI in project—Displays the name of the build VI after you select it from the Select Project File dialog box or generate a VI with the Generate VI button.
- Browse Project—Displays the Select Project File dialog box, in which you can select a VI in the project.
- Generate VI—Creates a VI with the pre-build template VI and adds the VI to the VI in project text box. The connector pane of the VI that executes before the build must match the connector pane of the pre-build template VI. If you do not have a VI with a connector pane that matches, click the Generate VI button.
If you click the Generate VI button to generate a VI, LabVIEW adds the VI to the project. - Execute VI after build—Includes a VI that executes after the build. Make sure the VI you want to include is under My Computer in the project.
When you place a checkmark in the checkbox, the Select Project File dialog box appears. Select a VI from this dialog box with a connector pane that matches the post-build template VI. If you do not have a VI previously generated from the post-build template, use the Generate VI button to execute a VI after the build.
For an example of a post-build VI with the correct connector pane, refer to the Sample Post Build Action VI in the labview\examples\project\pre and post build\sample pre and post build.lvproj.
Open example
Find related examples
If LabVIEW returns an error during the build, the post-build VI still runs. If the post-build VI returns an error during the build, the build fails and the Build Status dialog box appears.- VI in project—Displays the name of the build VI after you select it from the Select Project File dialog box or generate a VI with the Generate VI button.
- Browse Project—Displays the Select Project File dialog box, in which you can select a VI in the project.
- Generate VI—Creates a VI with the post-build template VI and adds the VI to the VI in project text box. The connector pane of the VI that executes after the build must match the connector pane of the post-build template VI. If you do not have a VI with a connector pane that matches, click the Generate VI button.
If you click the Generate VI button to generate a VI, LabVIEW adds the VI to the project.