Not a Path and path to string to path conversion

Not a Path and path to string to path conversion

Post by eaolso » Sat, 19 May 2007 03:10:10


Wiring a Not a Path constant to Path to String and wiring that to String to Path gives a valid path containing the text "<Not a Path>". I found that very unexpected. Is this intentional? If so, is there any string that can be converted to a path data type that is an actual Not a Path? It seems to happen in 7.1, 8.0, and 8.20.


NotAPath.png:
http://www.yqcomputer.com/


NotAPath.vi:
http://www.yqcomputer.com/
 
 
 

Not a Path and path to string to path conversion

Post by Casey » Wed, 23 May 2007 01:10:09

I agree that this behavior is confusing. The important thing to note here is that the Not a Number/PathRefnum function does not perform any syntax checking on the path wired in; instead it simply checks for a "Not a Path" flag, and outputs a boolean T or F based on that condition.
 
Converting a path to string and then back seems to lose this "Not a Path" information. To address this, I am going to contact our developers and suggest, at a minimum, that the documentation for the Not a Path/Number/Refnum be improved to better explain how exactly the function works. In addition, I would encourage you to submit a product suggestion at ni.com/contact. Your suggestion will go directly to the responsible developer, and we take every one of your suggestions very seriously.
 
What exactly are you trying to accomplish in your application by converting a path to string and then back again? I would be glad to work with you further to find an alternate method. I am sure that we can work together to get your program up and running.
 
I hope this helps!
 
Casey Weltzin
Applications Engineer
National Instruments