LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi library conflict

I have Main.vi and Main.llb (contains some subVIs that have same name as those in labview library) in the same directory. When Main.vi runs labview loads subVIs from labview library instead of from local Main.llb.  what should be done to have labview loads from main.llb?
0 Kudos
Message 1 of 12
(5,140 Views)

Change the names.

You will get the couriosest conflicts using VIs with the same name then VIs in the vi.lib. So just change the names inside your Main.llb

 

Christian

0 Kudos
Message 2 of 12
(5,136 Views)
I would change the name if there are only five or six of them, but there are too many names to change. Is there a better way to go about it?
Or is there a way to copy subVIs from my local library Main.lld to a folder as none library files ?
0 Kudos
Message 3 of 12
(5,112 Views)
One solution is to change your search path so that you put the directory where Main.vi is located as the first place to look for VIs. This should force LabVIEW to load the VIs from Main.llb. Then, when everything is loaded save Main.vi. The paths to the VIs will be saved and you can reset the search path back to default. Note that you need to restart LabVIEW for changes in the search path to take effect.

The other solution is to use the LLB Manager (Tools->LLB Manager) to convert your library to a directory and then you can rename the files programmatically.
0 Kudos
Message 4 of 12
(5,105 Views)

Bite the bullet and rename the VIs. It is a very, very bad programming practice to modify standard VIs and not rename them. You can write a program to rename them all using a VI method.

p.s. If you are using an llb for saving development VIs, this is also a bad practice.

0 Kudos
Message 5 of 12
(5,103 Views)
In fact, you should adopt a naming scheme for your VIs to prevent this from happening in the first place. I did this a long time ago, and it's saved me from many headaches.
0 Kudos
Message 6 of 12
(5,081 Views)
Smercurio suggested to change search path made perfect sense,
and I did it as follow:
LabVIEW>>Tools>Options>>Paths>>Library Directory, then uncheck use default box and replace with new path.
It still did not work, nothing different from before.  so I went back to path to check the path got change back to its default path. Any other suggestions?
0 Kudos
Message 7 of 12
(5,062 Views)
Dennis' suggestion of writing a utility that will open the files in question and rename and save them is probably your best bet, otherwise the brute force method of opening renaming and saving seems the only really viable method that doesn't run the risk of having this or similar problems in the future. If you change the search path for the directories it only solves the problem at this moment, then you may run into issues in the future where you open something that expects to use the actual vi.lib files and instead is loading from your directories. This name space collision problem is somewhat handled in LabVIEW projects, introduced in 8.x, but probably won't help in this situation.


Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 8 of 12
(5,058 Views)
I was actually referring to the "VI Search Path", not the library path, which I can't even see in the list, at least in LabVIEW 8.2.

Yet another alternative is to open the subVIs first, and the open the main VI. When you open Main it will load the ones in memory, and then you can save it with the paths updates.

Note that all these are just for the immediate problem.
0 Kudos
Message 9 of 12
(5,053 Views)
I'm wondering how this utility changing the names of his VIs should work, as the name of a VI is not programmatically changeable (VI Server) since it is saved once.
0 Kudos
Message 10 of 12
(5,026 Views)