LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Backslash Characters Using NIMax Import/Export

Solved!
Go to solution

I am developing a program that Uses the NIMax export featue to create an .INI file, that I then manipulate and re-import back into NIMax.

 

The problem I have come across is when I export from MAX and create the .INI file the carriage returns are included as /x0d,  but when I import the string is imported exactly as it looks and does not convert it back. I created a simple program to make sure that nothing in my program was causing the issue. (See Below).

 

I have also looked for work arounds in my program, but have not found anything. Is there a way to work around this or change the export/import system?

 

Michael

 

Test Program

Test Program

Original Text in NIMax

Original NIMax Text

 

Exported Text in *.INI File

Ini

 

Imported Text in NIMax

Imported Text into NI Max

 

0 Kudos
Message 1 of 4
(2,766 Views)
Solution
Accepted by topic author MK17
Actually, this makes perfect sense. Carriage returns and line feeds don't do well in INI files, so they are converted to slash codes when the string is saved. The import routine takes exactly what is in the file and imports it.

The strange bit is that it isn't consistent. The inserted string should be "\r\n" or "\x0d\x0a", but not a mixture.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,756 Views)

Ouch, thanks.

 

This is going to be a hard one to work around since my entire program is centered around using Configuration File VIs to manipulate the *.INI

 

I guess I'll have to try to come up with some code to at least remove the carraige returns and types back in a single line.

 

I did run this program with .txt and .nce. These both import properly but are not as easy to manipulate.

 

-Michael

0 Kudos
Message 3 of 4
(2,737 Views)

Escaping the return characters (and quotes, which are also escaped) makes perfect sense, as that is part of INI format, but failing to reverse the process to recover the original text when importing is a bug.  

0 Kudos
Message 4 of 4
(2,383 Views)