07-22-2010 10:16 AM
I want to Read a UNC Path from my Configuration File.
[Path]
UNC_Path=\\Hssvr01\5_Test_Data\17_Labview\2009
For this I use the LV2009 VI Read Key (Path).vi and as result I get:
H:\ssvr01\5_Test_Data_Labview\2009
When I set in the Configfile the UNC Path to:
UNC_Path=\\\\\Hssvr01\\5_Test_Data\\17_Labview\\2009
The result is:
\\Hssvr01\5_Test_Data\17_Labview\2009
This looks OK but I updatated from LV8.2.1 to LV2009 and in LV8.2.1 the variant with "UNC_Path=\\Hssvr01\5_Test_Data\17_Labview\2009" gives me as result "UNC_Path=\\\\\Hssvr01\\5_Test_Data\\17_Labview\\2009"
Why this have in LV2009 changed? Is this a Bug?
In the LV2009 help I found this:
http://zone.ni.com/reference/en-XX/help/371361F-01/glang/unc_filename_support_of_io/
Isn't this valid for Read Key (Path).vi?
07-22-2010 10:32 AM - edited 07-22-2010 10:32 AM
According to the help, backslashes have a special meaning in ini files.
Thus you need to read it as string, with "read raw string" set to true. Convert it to a path later.
07-22-2010 10:57 AM
Sorry, I have not explored what changed between versions. In the meantime, I made a product suggestion to make the "read raw string" input available as input to the path version of "read key".
07-23-2010 01:19 AM
"According to the help, backslashes have a special meaning in ini files."
Can you give me a Link to this help?
Isn't this a bug?
07-23-2010 02:08 AM
Check towards the bottom of this help page (also available from within LabVIEW)
Quote:
"The Configuration File VIs can read and write raw or escaped string data. The VIs read and write raw data byte-for-byte, without converting the data to ASCII. In converted, or escaped, strings LabVIEW stores any non-displayable text characters in the configuration settings file with the equivalent hexadecimal escape codes, such as \0D for a carriage return. In addition, LabVIEW stores backslash characters in the configuration settings file as double backslashes, such as \\ for \. Set the read raw string? or write raw string? inputs of the Configuration File VIs to TRUE for raw data and to FALSE for escaped data."
All clear? 🙂
07-23-2010 02:53 AM
OK Thank you!