02-22-2011 04:18 PM - edited 02-22-2011 04:19 PM
I used some templates (vit saved in a vilib) in my programming.
When I finished my Labview code, I saved the files by using save-as (folder type).
I found my code has some dependency of the template.
All templates even I didn't used were saved to my folder.
Is there some properties to separate the template from my codes?
Labmaster.
02-22-2011 05:22 PM
I don't really understand what you mean, but I'll explain the purpose of two things:
-VITs
VITs are VITemplates, meant as a quick start for new VIs, you cannot open a VIT easily, per default when you open a VIT, it will open a new VI containing the code of the VIT. If a VIT references another VI, the new VI will have that same dependency
-VI.lib
VI.lib is meant for VIs distributed with LabVIEW that can be used in many places, but be aware that VIs not shown on the palette might change in future versions. If you want to have your code in a 'Symbolic path'* I would place it in the user.lib folder.
Ton
*Symbolic path:
LabVIEW knows at least three symbolic paths (user.lib, vi.lib and instr.lib), these can be seen as disks (or mounts) on your computer. A vi that is using a VI in such a symbolic path is only storing the symbolic path and the relative path inside the symbolic path. The advantage is that you can move the calling VI without the need to relink to the symbolic path VI.
02-23-2011 09:24 PM - edited 02-23-2011 09:26 PM
I want to give you an example for LV ver 2010.
Please unzip the attachment and then open "demo.vi".
demo.vi is not speical but only depends on some controls (*.ctl). If missing file in opening, please specify the file in unzipped folder.
When you save as "demo.vi" using duplicate hierarchy to new location option, you can see the whole template (unused files contained in the "Style Book Utilities.lvlib") in the folder.
I want to remove this dependencies on unused items.
Labmaster.
02-27-2011 11:38 AM
Instead of using a 'Save As' (duplicate hierarchy) you could use a source distribution build. Such a distribution has several options, one of those is 'Remove unused library members' (or something alike) that should do the trick.
Ton
02-27-2011 03:04 PM
03-07-2011 11:44 AM - edited 03-07-2011 11:46 AM
Your Demo.vi has a dependency on the 'Style Book Templates.lvlib:Style Book Utilities.lvlib:States.ctl' control, this control is part of the Style Book Templates.lvlib, thus loading the other items into the dependencies.
You could convert your ctl to a ctt, so it won't be included. If you do that and create a new VI from one of the templates, LabVIEW will create a new States.ctl file
Ton