LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems when I copy my VI to another directory

Hello!

I have problem when I copy my Main Vi to another directory. It is included in the program to have a template main that I duplicate. When I have copied my Vi to another directory direct under the template directory it has problems to find subvi´s that are included in the main VI. The subvi´s are included in the same folder as the template VI. Is it possible to set in the template main VI where to look for the subvi included, independent where I copy it?

Please help!!


BR

Kristian
0 Kudos
Message 1 of 6
(2,437 Views)
Sure. There is a file path "constant" that will return the current VI's path. Use this, then strip off what you don't need with strip path and add in the new parts with build path.

Hope that this helps,
Bob
0 Kudos
Message 2 of 6
(2,425 Views)
Hello!

I understand how to get the current patch and change it. But how do feed the new path back into the Vi configuration?

BR

Krille
0 Kudos
Message 3 of 6
(2,407 Views)
I'm not sure I understand your question.
When are you copying the VI? During Runtime?
Are you calling it dynamically at all?
In the Paths page of the Options menu you can define Constant paths to search in and relative paths, but you should consider the fact that if the VI isn't found where it's supposed to be, it will take a while before it's found.

If this didn't help, please post more details about what you're trying to do, preferably with an example VI.

___________________
Try to take over the world!
Message 4 of 6
(2,404 Views)
Hello!

What is the status regarding this issue, is it something that still needs assistance or have you been able to solve it yourself?

I cannot see any example program from you like the previous poster asked for.

Please update us here if possible!

Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 5 of 6
(2,366 Views)
Hello!

I used TsT suggestion to get around the problem. It works now, and I am happy.

BR

Krille
0 Kudos
Message 6 of 6
(2,359 Views)