02-16-2016 09:09 AM
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?
Solved! Go to Solution.
02-16-2016 09:25 AM
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.
02-16-2016 12:31 PM
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?
02-16-2016 01:08 PM
@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.
02-16-2016 01:53 PM
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.
Thanks a lot!