Jump to content

How to Mass Reinitialise to Default?


Recommended Posts

Hello, I want to find away to reinitialise to default about 40 indicators at the start of my program. I am doing this because when I run the program again it uses the values that it previously had from the last run.

I could use an invoke node 40 times but this is a bit tedious

Does anyone know how to do it?

Link to comment

Hello, I want to find away to reinitialise to default about 40 indicators at the start of my program. I am doing this because when I run the program again it uses the values that it previously had from the last run.

I could use an invoke node 40 times but this is a bit tedious

Does anyone know how to do it?

I didn't find the property node that Mike mentions, but there is a method. I used it to create a little utility VI that finds all controls and resets them to default.

GUI - Set all Controls Default.vi

Edited by gleichman
Link to comment

I cannot find this node, any chance for a print screen?

There isn't a property node. It's an invoke node. Did you look at the code that I posted? If you don't want to use that utility: right click on control -> Create -> Invoke Node -> Reinitialize to Default

post-151-0-84619200-1305221477_thumb.png

Link to comment

Note that this invoke node will not clear tables or combo-boxes which I've always found infuriating throwpc.gif

That is not quite correct.

Tables will be cleared (or rather, set to Default) using that IN as their datatype is a 2D Array of Strings.

Combo-boxes have a String datatype so that will Default the 'selected item' (which is what the datatype refers to) not the actual list data in the combo-box which is persistent and accessed through e.g. Strings[] PN.

IMHO this behaviour is expected and should not be changed.

Link to comment

Get that on the LabVIEW Idea Exchange! Unless it already is, and in that case: link me to it!

I don't know if it is there or not. I don't visit the NI sites much any more since it kept asking me to verify my details-so I don't bother now. But we have over a year to argue about it before it is likely to be considered ;)

That is not quite correct.

Tables will be cleared (or rather, set to Default) using that IN as their datatype is a 2D Array of Strings.

Combo-boxes have a String datatype so that will Default the 'selected item' (which is what the datatype refers to) not the actual list data in the combo-box which is persistent and accessed through e.g. Strings[] PN.

IMHO this behaviour is expected and should not be changed.

Well. We are about to argue about semantics. :)

I didn't say what it should do, just that I find it irritating that it doesn't and pointing out that if the OP uses it, it probably won't do what they (and I) expect for those controls.

Link to comment

No, more like details laugh.gif -> Tables will default correctly using the IN (you said they wouldn't above).

Ok. Just for you biggrin.gif

I mean a Multicolumn List Box (which is a table to a simpleton like me :P ) rather than a Table Control. So yes you are right a "Table Control" does work. Not all table-type controls do though.

Edited by ShaunR
Link to comment

Get that on the LabVIEW Idea Exchange! Unless it already is, and in that case: link me to it!

Or don't since the method reinitializes the value property to default and those things *are not* values. It would be really frustrating for apps that don't dynamically populate their tables etc if LV wiped out the content every time the value was reset. Rings shouldn't be wiped, neither should tables.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.