04-22-2007 02:24 PM
04-22-2007 03:20 PM
This is normal behavior. In an executable (and in an LLB), the file itself is seen as a directory.
You can use the Application.Kind property to detect this, but my prefered method for this is to strip in a loop using a shift register and check the path using the File/Directory Info primitive and checking the Is Directory? output. You can see this in the Get Current VI's Directory VI from OpenG.
12-21-2007 06:10 PM
That is not normal behaviour. Who care about internal structure of LabVIEW? That is definetely a bug from any normal point of view.
12-21-2007 07:42 PM
12-22-2007 04:14 AM
12-22-2007 11:39 AM
nrp wrote:
tst,
Any particular reason why you dont use the Application.Kind method? The only benefit I can see is that maybe it simplifies the logic as you don't have to strip the path a certain number of times depending on whether its a developement system or a run time system.
12-22-2007 12:14 PM
12-23-2007 04:24 PM
To mikeporter
Can you show me function from any C library (for example) that works differently in debug or release modes?
12-23-2007 05:54 PM
V,
I hear your frustration. You will have to come to grips with the strip path vi behavior, as I have, by considering the deployment model for labview exe's. As tst pointed out above, an exe is a directory of sorts in labview when deployed as an exe. Equally confusing with be the use of "current vi's path.vi" if you use that anywhere. I have had the need to be able to return the application path (path in which the exe resides) from time to time in a portable and reliable way. I found some solutions in threads herein (don't remember the exact ones - go search!), and came up with the attached VI. Looking at this code may or may not help, but here it is nonetheless! (version is either 8.2.1 or 8.5)
-cb
12-23-2007 06:20 PM