From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking in wrong directories

Solved!
Go to solution
I replaced a new sub VI with the original and now I get a strange search pattern going on for which I do not see a solution in the archives. Here's the scenario. 
 
 
I have a sub vi named myVi.vi located in

c:\1\2\3\4
 
I rename myVI.vi to newMyVi.vi
 
I now bring in from CD the original version with the name myVI.vi. The CD version directory is
 d:2\3\4
 
Now labView is searching for dependencies in
 
 
c:\1\1\2\3\4 etc.
 
 
These aren't the real file names but I think it makes the explanation easier to follow.
 
 
I quit the load and opened the vi to see the error list and it is quite long. Do I need to fix each instance by hand? I have c:\1\2 in the vi search path.
 
 
thanks,
 
jvh 


0 Kudos
Message 1 of 6
(3,010 Views)

Addendum:

 

I put the search path at the top of the list but it still wants to check the NI directories first.

 

jh 

0 Kudos
Message 2 of 6
(3,007 Views)

Correction: The original post states it is searching in the wrong directory, actually the loading line incorrectly states it is loading the file

 

c:\1\1\2\3\4\myVI.vi.

 

It is actually in  

 

c:\1\2\3\4

 


jvh75021 wrote:
I replaced a new sub VI with the original and now I get a strange search pattern going on for which I do not see a solution in the archives. Here's the scenario. 
 
 
I have a sub vi named myVi.vi located in

c:\1\2\3\4
 
I rename myVI.vi to newMyVi.vi
 
I now bring in from CD the original version with the name myVI.vi. The CD version directory is
 d:2\3\4
 
Now labView is searching for dependencies in
 
 
c:\1\1\2\3\4 etc.
 
 
These aren't the real file names but I think it makes the explanation easier to follow.
 
 
I quit the load and opened the vi to see the error list and it is quite long. Do I need to fix each instance by hand? I have c:\1\2 in the vi search path.
 
 
thanks,
 
jvh 



 

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

I'm confused as to what you actually did. You said you "brought in from CD the original version" which was on the CD at D:\2\3\4. Do you mean you opened it from the CD, or did you copy the VI from the CD to the C:\1\2\3\4 directory? Locations of subVIs are stored within the caller VI as relative paths. Thus, if you had path changes there would be a searching issue.

 

I don't quite understand what you were saying about having set the search path. What does your viSearchPath key look like in your LabVIEW.ini file?

0 Kudos
Message 4 of 6
(2,984 Views)

Yes, that was poorly worded. I copied it from the CD to the C:\1\2\3\4 directory. 

 

 The search path I set from vi front panel Tools > Options > Paths > VI search path

 

 

LabVIEW.ini: 

viSearchPath="C:\1\2;<topvi>:\*;<foundvi>:\;<vilib>:\*;<userlib>:\*;<instrlib>:\*;C:\Program Files\National Instruments\LabVIEW 2009\resource" 

0 Kudos
Message 5 of 6
(2,975 Views)
Solution
Accepted by jvh75021

jvh75021 wrote:
LabVIEW.ini: 

viSearchPath="C:\1\2;<topvi>:\*;<foundvi>:\;<vilib>:\*;<userlib>:\*;<instrlib>:\*;C:\Program Files\National Instruments\LabVIEW 2009\resource" 


In order for LabVIEW to dig down beyond c:\1\2 you need to add \* to that first path so it searches subdirectories.

Message 6 of 6
(2,955 Views)