Admin Production ni-theme
Current Publication

Creating Files from Templates

LabWindows/CVI

New File from Template Dialog Box

Use the New File from Template dialog box to create a new file that is configured with the settings saved in the specified template file. You can create any type of file including .c, .h, and .uir files.

Select File»New»File from Template to open this dialog box. The New File from Template dialog box displays a tree that lists the templates that are available on the computer. When you select a template from the tree, LabWindows/CVI displays a description of the selected template in the field to the right of the tree. The New File from Template dialog box provides the following options:

  • File name—Specifies the name used to identify the new file. LabWindows/CVI substitutes [[FILEBASENAME]] in the filename of the new file with the text you enter in this option.

    LabWindows/CVI also uses File name as part of the value of the [[FILEBASENAME]] template variable. When you create a new file, the [[FILEBASENAME]] template variable becomes the text you enter in File name plus any other text in the template filename, excluding [[FILEBASENAME]]. For example, if your template filename is [[FILEBASENAME]]_Templates.c and you enter TestCode for File name, the [[FILEBASENAME]] template variable is TestCode_Templates.
  • File folder—Specifies the location in which LabWindows/CVI creates the new file. Click the ... button next to this option to browse to a different folder.
  • File path—Displays the full pathname of the new file LabWindows/CVI creates. You cannot edit this pathname directly.
  • Add this file to the current project—Adds the new file to the current project.
  • Create corresponding .h file—Creates a .h file that corresponds to the new file. This option is available only when the file template includes two files, one of which is a .h file.