I'm trying to edit automatically (with a LB/CVI program) some items values of an ini file which is often edited by users but the empty lines are deleted and they must stay (for visibility), is it possible with Labwindows/CVI ?
Additionally, I can confirm that CVI iniFile instrument does honor and maintain empty lines when it saves .INI files.
Maybe I forgot something, can you take a look to my code which replace some item's values of the ini file ? There is already items and values I just want to change them but all the empty lines of the file are deleted. (but the change of values work well)
You only have to add Ini_ReadFromFile at the beginning of the process; this will permit you also to issue Ini_Putxx calls only for modified parameters and not for all of them.
Sorry I forgot to put it in the file but there is a Ini_ReadFromFile just after the "file=Ini_New(0)".
Ok you're right: the IniFile instrument honors empty lines between sections but not those within a section (i.e. empty lines separating different items in a section).
From what I see, you have a couple alternatives at your hand:
The only alternative I can do is to modify Inifile code I will check this.
Thank you for your help.