LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

New project and file templates

CVI 8.5 does not find the templates placed in \Program Files\National Instruments\Shared\CVI\   directory. The CVI help gives the following information:
 
LabWindows/CVI can access project and file templates from different locations on your computer. LabWindows/CVI installs its predefined templates in the \Program Files\National Instruments\Shared\CVI\ directory. Templates that other National Instruments products provide are also installed in this directory.
 
After searching for the directory, the directory for the templates was found in the CVI installation directory that is on another drive on my machine. After moving my templates to this directory, they were found by CVI.
 
The help gives wrong information regarding this matter and I guess that the location has been moved because of Vista.
 
Smiley Indifferent
Jan
 
0 Kudos
Message 1 of 6
(4,011 Views)
Hello Jan,
 
Yes, you are correct. The template files location changed between CVI 8.1 and 8.5, because of Vista. Both the location of the predefined CVI templates, and the location where CVI looks for user-defined templates changed. Unfortunately, it looks as if that help topic was not updated, and we do apologize for that. The text that you quote is definitely incorrect, and we'll correct it as soon as possible.
 
Having said that, I'm curious about why you ran into a problem. The new location for the predefined CVI templates is C:\Program Files\National Instruments\CVI85\Project Templates. CVI 8.5 should automatically be looking for its templates in this location, instead of the old one. Did you run into a problem where CVI could not find its own built-in templates?
 
As far as your own user-defined templates are concerned, the old location for these was C:\Documents and Settings\All Users\Application Data\CVI\Project Templates. The new location (under XP) is C:\Documents and Settings\All Users\Documents\National Instruments\CVI\Project Templates. If you had some templates in the old location, you will have to copy them to the new location so that CVI 8.5 can find them.
 
I had been under the impression that this change had been documented in the readme, as well as in the help topic that you found. It turns out that it wasn't, and I'm really sorry about that.
 
Luis
0 Kudos
Message 2 of 6
(4,001 Views)
Hi,
 
The installation program worked fine. The template was made after the installation of CVI 8.5.
 
According to your information, the best place for the templates is   \Documents and Settings\All Users\Documents\National Instruments\CVI\Project Templates. Then they will be picked up by CVI at next crossroads.
 
Thanks,
Jan
 
0 Kudos
Message 3 of 6
(3,978 Views)

That's correct, assuming that it's a project template that you're creating, and not a file template. In my previous reply, for the sake of simplicity, I only provided the directories for project templates, and assuming that you're using Windows XP. If you're creating file templates instead, the directory is \Documents and Settings\All Users\Documents\National Instruments\CVI\File Templates.

Luis

0 Kudos
Message 4 of 6
(3,958 Views)
So how do we get multiple file templates into the folder?  If only one TemplateInfo.ini file is available, how do you accomodate multiple templates?

BTW on XP SP2, I can't create a     Documents   folder - it is    Shared Documents. 

And as far as the filename template variable, that gets rendered as the template file name, not the file name entered on the popup dialog.  The help file says that the [[FILENAME]] template variable will evaluate as the filename entered on the Filename text box on the popup but it doesn't.

Menchar


0 Kudos
Message 5 of 6
(3,884 Views)
Each file template has its own subdirectory in the File Templates folder, and also ts own TemplateInfo.ini file in that subdirectory.  Refer to the structure of the built-in templates in the CVI85 directory.  You may have been confused by the fact that the existing Source File template also has an associated header in the same directory, which is used when you select "Create corresponding .h file" on the dialog.

I think you may be mistaken about the help.  The New File from Template Dialog Box help topic says:

File Name—Specifies the name used to identify the new file. What you enter for this option becomes the value of the [[FILEBASENAME]]

and the Template Variables help topic says:

[[FILENAME]] Filename plus extension.
[[FILEBASENAME]] Filename without extension. LabWindows/CVI obtains this value from the File Name control in the New File from Template dialog box.

However, I should point out that there is a subtle error in these two descriptions. [[FILEBASENAME]] is not simply whatever text you enter in the File Name control, as they both state.  It is actually just the filename without extension.  So if your template file is [[FILEBASENAME]]_suffix.c, and you enter "Foo" in the File Name control, your filename will be Foo_suffix.c, and [[FILEBASENAME]] will be "Foo_suffix", not "Foo".  In effect, if your template file is named anything besides [[FILEBASENAME]].<file_extension>, the substitution of [[FILEBASENAME]] is inconsistent between the filename and the text within the file itself.

We clarify this point in the help for the next release.

Mert A.
National Instruments


0 Kudos
Message 6 of 6
(3,878 Views)