01-04-2017 05:41 PM
I would like to save a history of changes to a configuration ini file.
Does anyone have a good way to do this?
One of the problems is a line feed\new line confuses the parser.
01-04-2017 08:23 PM
Use the OpenG variant configuration file VIs to write arrays. Then you can keep the last X number of changes in the array.
01-05-2017 06:32 AM
You can save a history of all of the changes to all of your LabVIEW files if you use some form of Version Control (like SVN). It also keeps your code "lean and mean" -- if you need an older version, you can go back and get it (and can "find" it easily because you wrote "good comments" when you Committed it, didn't you ...).
Bob Schor
01-05-2017 08:57 AM
I do use SVN almost everyday for my code.
I am asking is for a way to include the change history inside of an ini file since these are configuration files that are at a customer site.
01-05-2017 09:39 AM - edited 01-05-2017 09:42 AM
It would be a big change but instead of using plain text INI files and parsing text use XML based INI files.
Then you can add comments or something like a history tag to document your changes.
Adding more tags and moving old tags under it will not confuse the XML parser because XML is hierarchical.
So if you were parsing for Input voltage
The XML parser would return 120 not 240 or an error.
Microsoft even has a FREE XML editor https://xmlnotepad.codeplex.com/ for making and editing XML files.
01-05-2017 09:46 AM
I am going to jump ahaed and state that you can NOT put anything in an "ini" file that is not a section or a tag.
Comments etc will be tossed the first time the file is written.
Please tell me I am wrong becuase I would love to add notes to the ini file.
Ben
01-05-2017 08:29 PM
Thank you all for your input.
From thinking about this my best solution is to place the History as one long string. Formatting comes out well on the Front Panel indicator although not as easy to read with a text editor such as Notepad. I keep "wrtie raw string?" = to FALSE. The \r\n shows up as hex which makes it a little cryptic.
I do have a simple way to read/write arrays to make them easier to read with a text editor. I have these placed in polymorphic VIs so that I can quickly choose the dimension.
From a quick web search Ben it looks like a semicolon can be used as a comment. Not sure the value of it though as it would have to be editted outside of the normal config VIs.