LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
MimiKLM

Removing the write configuration file control or changing its default value in Close Config Data.vi

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

Hi,

 

I can't find the reason why the users have to declare or not the writing of the configuration file.

 

Capture2.JPG

 

Usually, if you want to write into the file you have to declare it at the beggining when you opening the file. Then when you closing you just disposing the reference. That is the default thing for all language environments. So why complicating the thing?

 

It causes a lot of hidden problems because it usualy work on the development machines and on the deployment machines it doesn't work as the folders in Program Files are usually read only. That makes the debugging difficult and itself is unnecessary problem.

 

Usualy, users know upfront  what for they are opening the files, so why ask them at the end instead at the beggining? Additionaly, the Open Config Data.vi is testing indirectly the writeablity asking for creating the files if necassary,

 

Capture3.JPG

 

 so again, why to declare it at the end?

7 Comments
RavensFan
Knight of NI

Why would you need to write the configuration to a file if you didn't make any changes to the configuration?  You may not even know whether you made changes that need to be saved until the end when you are ready to close the config file.

 

I don't consider your message an idea for the NI Idea exchange.  You aren't actually suggesting any improvements to LV.  You are basically just asking why something is the way it is.  This message belongs in the regular LabVIEW forum.

MimiKLM
Active Participant

Ok,

 

Maybe I left my idea without summarising and direct statement and with a few open questions. However, I still believe that my suggestion is the improvement.

 

RF says: "Why would you need to write the configuration to a file if you didn't make any changes to the configuration?"

 

I don't want to write any configuration. I want to read them only. And the Close Config Data.vi silently assuming that I DID the change. Hence my sugestion is to remove it totally or change the default state of this flag as it makes a lot of confusion comparing to normal, default closing file operation as we know in other environments. When I'm closig the file which I'm thinking of to be read only I don't want the system to make that default, implicit decision for me at the end about writing the configuration file which I didn't change.

 

Removing this switch or changing the default state of it to "not to write" I'd call improvement.

RavensFan
Knight of NI

What version of LabVIEW are you using?

 

There was a change to config files a few versions ago.  In LV 2011, the input is "write file if changed (T)".  It only writes out the data if you have a True wired here (or nothing) AND the data is "dirty", meaning the config file data has a flag set in it saying the data has changed.

 

I think it was changed for the very reason you are asking for it, that you had to explicitly wire in a False constant to prevent saving data to a file when there is no reason to rewrite the file since nothing changed.  I think this idea can be closed as already implemented in LabVIEW.

MimiKLM
Active Participant

My version is 8.6.

 

I'll check how it is in 2011 Eval.

Dragis
Active Participant

Maybe I'm missing something, but it sounds to me like the idea is to move the selection of whether or not the file is opened as "Read Only" or "Read/Write" to when you open the reference. The default behavior of when we update a file that is opened in "Read/Write" mode is a secondary issue. If this is the case, then I like the idea as it would make the API more consistent with other file APIs.

MimiKLM
Active Participant

Ravens,

 

You were right in version 2011 they changed it slighty, so it would work for me better.

 

However, I think Dragis caught the point by saying "(...)would make the API more consistent with other file APIs."

 

That really woud be better.

 

K.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.