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

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 2021 automatically fills indicator

Solved!
Go to solution

@NIquist wrote:

I agree with RTSLVU.  I can't think of any default behavior that would be more convenient and expected than what it currently is.  Whether a constant, control or indicator; they all act just like you cut and pasted or cntl drag and dropped them.  If they have content, it is copied.  If they don't, it's blank.  Sounds right to me.  🤔


Different people have different thoughts. My logic tells me, the indicator should go blank again once I cut the wire, but it won't. So that default behavior is illogical to me when the code is just typed.

0 Kudos
Message 11 of 15
(424 Views)

@MaSta wrote:

@NIquist wrote:

I agree with RTSLVU.  I can't think of any default behavior that would be more convenient and expected than what it currently is.  Whether a constant, control or indicator; they all act just like you cut and pasted or cntl drag and dropped them.  If they have content, it is copied.  If they don't, it's blank.  Sounds right to me.  🤔


Different people have different thoughts. My logic tells me, the indicator should go blank again once I cut the wire, but it won't. So that default behavior is illogical to me when the code is just typed.


For me, sometimes it helps, sometimes it hinders.  More often than not, I don't even pay attention to it.  Possibly because I rarely create indicators from constants or constants from controls.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 12 of 15
(393 Views)

So this really has nothing to do with the wiring, but with switching an item between constant|control|indicator.

 

A diagram constant values is always the "default value" and if I want a control with a certain default value, creating a constant, filling a value, and switching it to be a control is often faster than creating the control, filling the value, and setting the default. This behavior has always been desired. Similarly, e.g. during debugging, I create an indicator after the file reading, run once, then turn the indicator into a constant and disable the file IO. This makes testing faster. Or I might run known good code and create a constant from the final result, then do a comparison with the new value after some code tweaks to ensure that the result is still as expected.

 

More annoying to me is that if I have a constant and I need an array of constants (e.g. strings), I get an array of strings where the elements have the default value of the original constant. In most cases, my muscle memory automatically clears the contents of constants before turning it into an array. It is annoying if all elements outside the valid range have a greyed out non-empty string value.

 

 

Message 13 of 15
(382 Views)

@billko wrote:


For me, sometimes it helps, sometimes it hinders.  More often than not, I don't even pay attention to it.  Possibly because I rarely create indicators from constants or constants from controls.



Agreed, I may play around at first when I design my GUI and then I like the quick "Change to.." behavior.  When I go to make my final GUI, I will start all over and make it pretty by starting with new indicators.  Put them in decorations, tabs or whatever and align them nicely.  The current behavior seems like a reasonable compromise.

 

I noticed that C# (WPF at least) has similar behavior.  You can't "Change to ...".  But if you copy/paste a TextBlock, its content gets copied too.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 14 of 15
(356 Views)

@altenbach wrote:

So this really has nothing to do with the wiring, but with switching an item between constant|control|indicator.

 

A diagram constant values is always the "default value" and if I want a control with a certain default value, creating a constant, filling a value, and switching it to be a control is often faster than creating the control, filling the value, and setting the default. This behavior has always been desired. Similarly, e.g. during debugging, I create an indicator after the file reading, run once, then turn the indicator into a constant and disable the file IO. This makes testing faster. Or I might run known good code and create a constant from the final result, then do a comparison with the new value after some code tweaks to ensure that the result is still as expected.

 

More annoying to me is that if I have a constant and I need an array of constants (e.g. strings), I get an array of strings where the elements have the default value of the original constant. In most cases, my muscle memory automatically clears the contents of constants before turning it into an array. It is annoying if all elements outside the valid range have a greyed out non-empty string value.

 

 


I have exploited this feature a lot during debugging, I get a copy of runtime data of some wire for offline testing, in this case, I would probe the data, copy it to a VI as a constant and create controls/indicators from them, now I can create tests with a default value for the inputs.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 15 of 15
(339 Views)