From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

create Control Ref.

Hi

My task is to cerate reference automatically by selection

So far it works fine but here are my problem

If I have a control that is in a sequence how I now the position in depending of the sequence

I only get the position from the zero point from the block diagram but I need the position from the sequence

Any idear   

ref.png

Jürgen

PS

LabVIEW 2010

0 Kudos
Message 1 of 6
(6,107 Views)

This is a quirk in the way LabVIEW scripting works.  To get the position relative to the subdiagram an object is in, you need to subtract the absolute position of the 0,0 point of the subdiagram.  Unfortunately, there is no native method to give this to you.  The best way to find this position is to create anything at the 0,0 position of the diagram, read its position (it will be relative to the main or root block diagram), then delete the object.  This works no matter how deeply nested your diagrams are and no matter what the host of the subdiagram - sequence, FOR loop, case structure, etc.  I have attached a standard utility VI I use for this (LabVIEW 9.0).  Wire the diagram reference into the object ref input.  For single frame structures, wiring the structure ref in will also work.

Message 2 of 6
(4,825 Views)

Thanks

Thats help's  a lot

Now it is working im my way

Jürgen

0 Kudos
Message 3 of 6
(4,825 Views)

Is there any way to create a reference of a control reference automatically? I want to write a QuickDrop to do this. Can you tell me how did you do it ?

Thanks!

CLD
CAU
0 Kudos
Message 4 of 6
(4,359 Views)

Could you please clarify:

Do you want to create a reference to a CONTROL, that holds a control reference, e.g.

CTRLrefnum.PNG

 

 

 

 

 

 

Or do you want a reference to a control reference (constant), e.g.

CTRLreference.PNG

0 Kudos
Message 5 of 6
(4,349 Views)

By the way, there might already exist a shortcut that does what you want:

https://forums.ni.com/t5/LabVIEW-APIs-Documents/Quick-Drop-Keyboard-Shortcut-Commands-for-quot-Creat...

0 Kudos
Message 6 of 6
(4,347 Views)