LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
RobertoBozzolo

Features wanted for inifile instrument

Status: New

At present the IniFile instrument permits to read an existing .INI file, modify it and re-save it preserving existing comments in the file, if any. It would be a great addition to permit to programmatically add comments to sections and/or items.

 

I have a rather complex application with several optional modules that can be added or tailored by setting appropriate items in a configuration file in .INI format. I have developed an application that helps me creating such configuration files with the proper elements added but if I want to add some comment for better documentation to the final user I need to manually add them after the file has been created with the risk of forgetting something: if I could add them while generating the configuration file I would avoid this risks.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
1 Comment
gdargaud
Active Participant

Hi, there are plenty of inifile manipulation libraries available as open-source, each with their strengths and weaknesses. I don't remember ever seeing one that allows for manipulating comments, some even strip them off entirely. This being said, while I agree with your request, there's no concept of 'position in an ini file (it's a database of assignments), so a comment is not assigned to a variable, and hardly to a section.

 

A simple workaround would be to save a simple string with the comment in it.