03-09-2010 12:39 PM
I have two vi, one is a loading vi, another is main vi.
they has below directory structure:
G:\LV_Source\main_screenflash.vi
G:\LV_Source\list\main_About.vi
In main_screenflash.vi, i create a path to lunch main_about.vi and main_screenflash.vi should
exit. It can work. But after create a exe file, the main_about.vi can not be displayed. A screen flash
quickly, then dispear. It seem that it is showed, but i don't know why it dispear. After tested many times,
but cannot find root cause yet, please help me to fix it.
attach my vi. it is very simple. please correct my error. thanks. 🙂
03-09-2010 12:53 PM
you must be getting wrong path when you create exe......use an indicator to see the path of the main_about.vi in the exe....
one sub VI is missing..so i can not run your program and seee........
03-09-2010 03:18 PM
Add a strip path in there. when running as an exe the current path returns the exe file. for example
devlopment /labview/myvis/main.vi
exe /labview/myvis/main.exe/main.vi
You can use an app property node app.kind to determin if it is running in the devlopmet enviorment or as an exe to do this automatically.
Greg
03-09-2010 09:43 PM
hi, Reddy
thank you.
I had tried to display path. Only a .exe directory is added. But i don't know whether this can lead to my problem.
For main_about.vi, its relative path will be kept after creatng exe,right? I mean if relatve path is kept, no error should
be existed, But i am not sure about it.
attached missing vi and jpg.
thanks again.
wish you can help again.
03-09-2010 09:50 PM
Hi, gosenbach
thank you firstly.
But i don't understand how this extra exe path can lead to my problem. 😞
my first vi can be started, its path: labview/myvis/main.exe/main_screenflash.vi
for second vi, its pash should be:labview/myvis/main.exe/list/main_about.vi.
it right? I think it can be found too.
I don't know relative path whether will be kept after creating exe file.
thanks. Please continue to help me.
br
03-09-2010 11:04 PM
hi,
every time, I can see my main_about is showen, but very quickly, it dispear. So
i think it is not a problem of path. But i still don't find root cause.
😞
thanks.
03-09-2010 11:18 PM
It is defenetly the problem with the path
Now consdier these paths
G:\LV_Source\main_screenflash.vi
G:\LV_Source\list\main_About.vi
When run in the development mode evrything is fine....
But when the installer gets created the path will become as ......\About.vi\application.exe or something like that...
So what you do is rip the path twice if the the code is running in the exe mode....
The below snippet shoud solve the problem