LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

deleting a section of data from an ini file (config file)

Solved!
Go to solution

Hi

I have used that method but.. If I delete the section LPt3 and its keys, I need to upadate the Section_Name without the Lpt3

My config file is something like this

[Device]

Section_Name = " Lpt1 Lpt2 Lpt3 Lpt4 Lpt5 Lpt6"

[Lpt1]

Name = "Lpt1"

Value = "4"

[Lpt2]

Name= "Lpt2"

Value = "6"

so on till Lpt6 ....So when I delete the Lpt3 device I would like to update my Section_Name...

How could that be done or rewrite the file?

0 Kudos
Message 11 of 12
(1,240 Views)

mkReddy wrote:I have used that method but.. If I delete the section LPt3 and its keys, I need to upadate the Section_Name without the Lpt3

As GerdW already stated, you will want to read that key, do the string manipulation to remove the Lpt3 from the string, and then write back to the key.  Again, the configuration file API takes care of all of this except for the actual string manipulation.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 12 of 12
(1,230 Views)