10-20-2015 07:24 AM
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
10-20-2015 07:28 AM - edited 10-20-2015 07:28 AM
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!
10-20-2015 07:28 AM
Seems like you are looking for the "Configuration File" palette.
http://digital.ni.com/public.nsf/allkb/FE4052AADA227B5686256F490036462F
10-20-2015 07:31 AM
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..
10-20-2015 08:10 AM
@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"
10-20-2015 05:06 PM
@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?
10-21-2015 02:01 AM
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.