LabVIEW Idea Exchange

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

Lock the State of a Boolean Constant

Status: New

Sometimes I think it would be nice to be able lock the state of a boolean constant. When moving boolean constants on the block diagram it's easy to accidentally change their state.

 

Depending on how well commented our code is we should probably be able to figure out pretty quickly how it should have ben set. We can also make the label visible and make the label indicative of how the constant should be set.

 

The problem is sometimes we move the constant on the diagram and change the state without realizing we did it. If we could lock the state it would ensure that the state is only changed when we really want to do it. When changing to a control or indicator this option could just go away.

 

locked_boolean.png

8 Comments
Darin.K
Trusted Enthusiast

Here is a different approach to the same problem:

 http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Changing-state-of-Boolean-constant-is-too-easy/idi-p/1...

 

Here is a more generic version of this idea:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Lock-Block-diagram-object-from-accidental-editing/idi-...

 

Here is what I do: When LV "gives me the finger" (ie. by moving over a Boolean constant) I simply hit shift which gives me the positioning tool. Click to select, then grab and move. Not quite a single click and grab, if you try that you can only move in one direction. Still, it has stopped me from the annoyance of editing objects without resorting to turning the autotool off.

X.
Trusted Enthusiast
Trusted Enthusiast

What about audio feedback (blaring siren when switching to a FALSE value, victory fanfare when switching to TRUE)? Joke apart, I feel your pain, but this probably happens because you are using the evil auto-select tool mode. I personally never got used to it, so I have to manually switch from grabbing to pressing to be able to do the mistake you are taking about.

Maybe you should consider this?

 

Edit: Darin beat me to it. You get the idea...

dthor
Active Participant

X., I'm just the opposite. I learned LV with the autoselect tool and now, whenever it's off, I freak out and think that LV is broken.

 

On the subject of the Idea, it's been proposed before as Darin.K mentioned. Nonetheless, I support the Idea of being able to lock block diagram objects/constants. They would definitely need an easily distinguishable visual cue that screams I'M LOCKED.

X.
Trusted Enthusiast
Trusted Enthusiast

🙂 I am old school... I started when there was not even an undo or an autosave...

egraham
Member

Ahhhh.. I should have guessed. Well maybe someday. Until then grabbing with the shift key held down is some cheap insurance. Thanks for the pointer Darin.

AristosQueue (NI)
NI Employee (retired)

In the meantime, as a workaround, you could just create a subVI that returns True and another subVI that returns False and then use those. Mark those VIs as Inline and you should have identical performance with no ability to toggle!

(I'm not sure if I'm joking or not... I mean, it should work... though kind of silly... 🙂 )

Darin.K
Trusted Enthusiast
I like to have SubVIs as inlined constants as much as the next guy, but it can be tricky to make an array of subVIs. 🙂
egraham
Member

A subVI.... That's an obvious idea. Why didn't I think of that?