LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to search above <topvi>?

I have a folder structure where main.vi is located in a subfolder. It calls a subvi from a different subfolder. Is there any way to add a path like this to the "VI Search Path" of the main.vi? I don't want the users to have to find the subvi's.

Example:

Folder1
subfolder1
main.vi
subfolder2
subvi.vi

When I open main.vi, I want subvi.vi to be found regardless of where folder1 is located. I tried using "\..\subfolder2\*" but it doesn't like the syntax. Are there any constants that allow you to use locations relativ to the main.vi?

BTW, I don't have any direct control over the way the folder structure is distributed.

Thanks.

-jeff
0 Kudos
Message 1 of 3
(2,739 Views)
> Example:
>
> Folder1
> subfolder1
> main.vi
> subfolder2
> subvi.vi
>
> When I open main.vi, I want subvi.vi to be found regardless of where
> folder1 is located. I tried using "\..\subfolder2\*" but it
> doesn't like the syntax. Are there any constants that allow you to use
> locations relativ to the main.vi?
>

If you can control the relative location from main.vi to subvi.vi,
including the name of the folder subvi.vi is in, you will not need to
use the search mechanism. This relative path is what LV saves when you
save your VIs, and it is all LV cares about when loading. It is when
the VI is not located in memory, and not found at the relative path,
that LV starts to search.

Greg McKaskle
0 Kudos
Message 2 of 3
(2,739 Views)
If I don't know where Folder1 is relative to the root folder, how can I tell main.vi to find subvi.vi? I don't know how to make it search up to the parent folder and then down to a sister folder.

It might be obvious but I don't see it. I am trying to enter the path in the "VI Search Path". Maybe this isn't the right place.

-jeff
0 Kudos
Message 3 of 3
(2,739 Views)