LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ini files adding values to keys

Hi Everyone,

I am thinking of modifying the standard config file vi's and would like some feedback on the idea before I start.  Currently I tend to use a FGV to store config options in my vi's.  This way I can open the file, read the keys and store them in a cluster in the FGV and then read and write the keys from anywhere in my application. 

 

I would like to modify the key values programmatically like

 

[Device]

Section_Name = " L1 LWT Wert"

[L1]

Eng_Typ = 1

Value = 200

 

Now I would like to add " LTACC" to  Section_Name

 

Thank you in advance

Mahesh

 

0 Kudos
Message 1 of 7
(4,655 Views)

Take a look at the OpenG and MGI INI functions - I use the Open G Variant Configuration File functions extensively and they're really good for saving/loading configuration clusters to/from INI files. At the very least, it's worth having a look at them before you delve in and start writing your own!


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 7
(4,648 Views)

Seems like you are looking for the "Configuration File" palette. 

 

http://digital.ni.com/public.nsf/allkb/FE4052AADA227B5686256F490036462F

Message 3 of 7
(4,646 Views)

I am Using the same method as you mentioned .. in the link. I would like to know how to add it to the section _name programmatically..

0 Kudos
Message 4 of 7
(4,638 Views)

@maheshwarreddy wrote:

I am Using the same method as you mentioned .. in the link. I would like to know how to add it to the section _name programmatically..


The snippet below would create a new *.ini file that read like this:

 

[Device]
Section_Name = "LV LWT Wert"

 

Config.png

Message 5 of 7
(4,614 Views)

@maheshwarreddy wrote:

I would like to know how to add it to the section _name programmatically..


What exactly do you mean by "add it"?  Are you just changing the value?  Are you trying to concatinate the strings?  Are you trying to make a new key?


GCentral
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
0 Kudos
Message 6 of 7
(4,583 Views)

I am trying to add an element LPTCC to the key as shown below

 

Section_Devices = "LT1 Wert LPTCC "

 

LPTCC is a section which has differnt keys to regarding the device to store it to the FGV.

0 Kudos
Message 7 of 7
(4,563 Views)