LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Path to main vi in exe

Solved!
Go to solution

Why do I get inconsistant results when running both snippets as an executable? Built from the same project builder. For some reason the path to the main vi is different in both cases. How can the sub vi effect the result?

Capture.PNG

0 Kudos
Message 1 of 5
(3,709 Views)

Where is your subVI relative to your main VI?

 

My guess is that your directory structure looks something like this:

Main: Framework\Reference framework\_Main.vi

subVI: Framework\some other directory or none at all\sub.vi

 

With the subVI disabled, it is not included in the build.  And since the build uses the relative paths from the most common directory, you will have different results due to the enabling of that subVI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,692 Views)

Thanks.
The main vi is located in ..\Sources\Framework\Reference framework, the sub vi in ..\Sources\Sub so that’s correct. But I don’t understand why disabling (or deleting) the vi results in another path. What do you mean by the most common directory?

0 Kudos
Message 3 of 5
(3,662 Views)
Solution
Accepted by topic author Steffan.W

@Steffan.W wrote:

But I don’t understand why disabling (or deleting) the vi results in another path. What do you mean by the most common directory?


The most common directory of the VIs that are going into the executable.  With your subVI enabled, then the most common directory is Sources.  So if you look in Windows Explorer the Sources folder, you will see a similar directory structure as what will be in your executable.  But with the subVI disabled, it is no longer going to be in the executable.  Since you apparently have nothing else in the Sources\Sub directory (or Framework directory for that matter), the most common directory is Reference Framework.

 

Maybe it should be least common directory.  It is the lowest directory you can go into that all of the VIs in the executable share.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(3,645 Views)

Ah, now it’s clear. “Problem” is that the sub vi isn't in the folder hierarchy of the main vi. Without the sub vi the exe directly points to the main vi.

Naamloos.png

Thanks a lot!

0 Kudos
Message 5 of 5
(3,630 Views)