03-14-2006 12:46 PM
03-14-2006 12:55 PM
If you use Current VI's Path in an EXE, you'll have to strip the path twice, since the path to your VI when it is built into an EXE will be c:\temp\blah.exe\my.vi. Notice how the EXE path is thrown in there? Anyway, if you search the forums you'll find this issue discussed several times...some people use the App.Kind property of the Application class in VI Server to determine how many times to strip the path, while other people get the path and search it for '.exe' to see if it's got EXE inside it. Personally I think using the App.Kind property is the easiest way to go.
Good luck,
-D
03-14-2006 02:08 PM
Thanks. Currently I call the sub .vis by using the current (main) .vis path and stripping it once. So if I built an .exe even the calls to the sub .vis would stop working? So if I had all of the sub .vis in a .llb and then made an .exe, I would have to strip 3 times to write a file to the current directory from one of these sub .vis?
strip this three times:
\programs\XXX.exe\XXX.llb\XXX.vi
to get:
\programs\
03-14-2006 02:24 PM