06-27-2013 03:53 AM
When I use Writekey.vi to modify a config file, and then use close configdata.vi to save the file.
Why every key will add a spce before and after "=".
06-27-2013 05:34 AM
@JohndyWu wrote:
When I use Writekey.vi to modify a config file, and then use close configdata.vi to save the file.
Why every key will add a spce before and after "=".
Just try open block diagram of 'Write Key.vi' and then open its sub-VI 'Add Key.vi'. You'll find that, adding space between is intended in this sub-VI, as shown below.
06-27-2013 09:03 AM
When you open the config file the whole file is read into memory. When writing the file the whole file is written, so all keys (modified or not) will be "rewritten".
The space before and after the = as well as the empty line between sections have been introduced for better readability as far as I know.
The file will still be read correctly by older versions of the config file VIs in case you're concerned about that.
06-27-2013 08:45 PM
OK, I understand your advise. But I try to modify this writekey.vi( add "F" to "Add Comment") and the space is add to my data also.
You also said that all the key value will be re-write when close to config file.
so I find close config data.vi, view its block diagram then find save conifg file.vi then find config to string.vi, the space write here.