LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ConfigFile Read Key (Path).vi BUG?

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?

 

 

 

 

Download All
0 Kudos
Message 1 of 6
(3,361 Views)

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.

 

0 Kudos
Message 2 of 6
(3,352 Views)

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".

0 Kudos
Message 3 of 6
(3,338 Views)

"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?

0 Kudos
Message 4 of 6
(3,306 Views)

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? 🙂

Message 5 of 6
(3,299 Views)

OK Thank you!

0 Kudos
Message 6 of 6
(3,291 Views)