LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strict reference

Solved!
Go to solution

i am trying to set the value of a control through a property node.  The input type is varient, since the reference passed is not strictly typed.  Is there a way to convert the reference in the example attached to a strictly typed, so that I can passed a boolean, instead of a varient, into the value property?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 5
(6,354 Views)
Solution
Accepted by topic author jyang72211

The FP has functions that allow for that.

 

Change the constan on the diagram to a control.

 

Get a copy of the boolean (just copy it from where ever it was to start out).

 

Drop the copy on the same FP as the refnum control.

 

Do a ctrl-copy of the boolean then drag it into the refnum control and watch cloesly that the refnum will change when you find teh sweet-spot and drop the copy into the refnum control. The refnum will then be a strict of teh type you want.

 

YOu can toss the copy of the boolaen after you are done.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(6,350 Views)

Oh, so you can only do it to a control and not a constant.  I see.  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 5
(6,338 Views)

Another way to get a constant of a strict type reference is to create a reference to the front panel object, then create a constant from that reference.  Two right-clicks, no dragging things around on the front panel.

Message 4 of 5
(6,328 Views)

I found another way. After changing the reference to control, right click >> select "Include Data Type". This seems to be the simplest way for me.

TailOfGon
Certified LabVIEW Architect 2013
Message 5 of 5
(6,316 Views)