LabVIEW Idea Exchange

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

Ability to link a reference control to a type definition

Status: Completed
Available in LabVIEW 2012

Here is the problem.  I create a type definition control on my front panel.  I then pass a reference to this control into a sub VI.  To do this I have to place a reference control on the sub VI to accept the input type definition reference.  Now if I go back and modify the type definition control, the reference control on the sub VI to accept the type definition reference is no longer valid and the result is a broken wire.  To fix this I have to create a new reference control on the sub VI to accept the type definition reference, again.  It would be very nice if I could somehow link the reference control on the sub VI to the type definition so that when I modify the type definition the reference control linked to it would automatically update as well.

12 Comments
dthor
Active Participant

I've noticed this as well. I can't tell if it's a bug or not.

SteveChandler
Trusted Enthusiast

Is it a strict typedef? I'm not sure if that is what is going on. Is the reference control also a typedef?

=====================
LabVIEW 2012


dsloan
Member

The typedef (control in main VI) is a strict typedef, the reference control on the sub VI is not a typedef

PaulG.
Active Participant

This is not a "bug" but a "feature". This has been annoying me for years. Kudos!

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Peter_Hopeful
Member

Try use a Control-Reference and drag a variable into it. (On the frontpanel)

AristosQueue (NI)
NI Employee (retired)

I'm declaring this a bug and have filed CAR 335523.

If you just create a reference from a typedef control and then create a control of that reference type, you do not get the linking to the typedef. The workaround from Peter DOES work:

> Try use a Control-Reference and drag a variable into it. (On the frontpanel)

HERE'S A MORE DETAILED SEQUENCE FOR PETER'S WORKAROUND:

  1. Drop a plain control refnum from the palette.
  2. Drop an instance of your typedef onto that refnum (ctrl+drag works if you already have your typedef somewhere on the panel)

To verify that it worked as you hoped, pop up on the refnum and select "Show Control". Then pop up on the control inside the reference and make sure that the options to open the typedef are present.

dsloan
Member

Great!  Thanks for the work around until this get fixed.

MaryH
Member
Status changed to: In Beta
 
JordanG
NI Employee (retired)
Status changed to: In Beta
 
David_Grucza
Member

If I understand what you are saying there already is a way to do this: Right-click on the Reference Control (on your sub-VI FP) and select "Show Control" (The Reference Control expands to show the control it is a reference to). Then right-click on the control (inside of the Reference Control) and replace it with the TypeDef. I agree that it would be nice if there were an easier way to link the Reference Control to the TypeDef.