From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mythilt

Clear Changed default value.

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

I was looking at Altenbachs suggestion about adding the ability to 'Make Current Controls values default' and had a thought.  What about resetting the controls to their 'factory' state defaults. The 'Reinitialize Values to Default' menu selection will set the controls to the current default, which may not be the original default value due to the use of the 'Make Current Values Default' option.  What I am suggesting is a menu item 'Clear Changed Default Values' which will remove any changed default value and reset the control/indicator to its 'factory' setting.

A quick example where this might be nice, is if I have several arrays that I have populated and set to default for debugging purposes, when I'm done debugging it would be nice to be able to go to the edit menu to clear all of the arrays rather than having to select each one, clear its contents, and then saving the cleared array as the new 'default' value.

Jon D
Certified LabVIEW Developer.
10 Comments
Intaris
Proven Zealot

This makes no sense.

 

If you "make Current values Default" then these are the values you revert to.  If you want to be able to revert to DIFFERENT values, you need to store them yourself and then set the value and re-call "make Current Values Default" again.

Mythilt
Member

What I am suggesting is a quicker way to remove any 'make Current values Default' settings.  Having to select every control and set its value when all I want to do is return the value to the same original default state as it had when I first dropped it onto the front panel can be tedious.  This is not wanting to change to a new non-standard default value, but rather the removal of the original 'make current values default' action.

 

And to me, it makes a fair amount of sense.

Jon D
Certified LabVIEW Developer.
X.
Trusted Enthusiast
Trusted Enthusiast

Like in Default and Defaulter?

 

Intaris
Proven Zealot

And then youll need a defaulterer

Mythilt
Member

Where is a wince emoticon when you need one?  Those were baaaaaad.

Jon D
Certified LabVIEW Developer.
AristosQueue (NI)
NI Employee (retired)

A Labview class has a private data control that defines its default value. If the controls have never had their default value set, that means the class has a default default value. When you drop a control of a class, it has a default value. If the class has never had the default values of its private data control set, then that dropped control has a default default default value. If you create an XControl for the class type, and then drop an instance of the XControl, the instance has a default default default default default value.

 

We could probably add N menu items to support all the levels (Reset To Default Default Default Default Default Value, etc), but at some point, it probably just makes sense for you to re-drop the control. 🙂

AristosQueue (NI)
NI Employee (retired)

PS: I'm not saying this idea should be closed. It's a reasonable request. I, personally, don't think it has enough utility to warrant doing, but perhaps the Kudos will say otherwise.

Mythilt
Member

A one-step re-drop of the control is kind of what I was thinking of it being like (though it would not alter things like control size, colors, etc., which can be a pain with re-dropping the control) not an undo type thing.

 

As I mentioned above, Altenbachs thread caused me to think about this, in part due to the comments about VI data bloat from array indicators being filled and populated, which lead me to wonder if after populating an array, defaulting it, saving the VI and therefore allocating the memory for the array to contain the data in code, then erasing the contents of array, defaulting it,then saving it, would the VI still be pre-allocated to the original array size, or would it be once more an array of size 0 in terms of memory.

 

The example I gave was from when I was first learning LabVIEW back in the late '90s, it was a bother to have to clear the defaults from the arrays (more because the array controls / indicators were hidden since the FP was a UI that the arrays fed, than because there were lots of them.)  These days, I'd make a wrapper with the defaults to call the VI I am testing.

 

Jon D
Certified LabVIEW Developer.
AristosQueue (NI)
NI Employee (retired)

Mythilt: I think the current behavior of "Empty Array" then "Make Current Value Default" covers the use case. Most of the complex controls have the equivalent ("Clear Chart", for example). Adding a more direct one-click option just seems to me to promote too high a pretty rarely needed option. I could be wrong, but that's my current perception.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.