06-02-2014 04:51 AM
Hello,
i have a ini-file that is created in Labview using the "Config File VIs".
For example:
[section_1]
key1 = 1
[section_2]
key2 = 1
[section_3]
key3 = 1
Now i am loking for a method to "rename" the sections. I tried with simple "Remove Section.vi" and after this "Write Key.vi" with the new section name.
Works fine BUT now the new section is at the end of the ini-file.
How can i rename a section and keep the position inside of the file?
Thanks for tips
06-02-2014 07:07 AM - edited 06-02-2014 07:07 AM
I recommend going the text file route. Read in the entire file as a string. Then use Search And Replace Substring to change the name of the section. Then replace the file.