ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically alligning objects

Hi,

 

I was wondering if there is any way to programmatically change the z-axis of the objects in LabVIEW, just like you would do using CTRL-J or CTRL-K in edit mode.

 

Regards,

 

Chris

0 Kudos
Message 1 of 5
(2,870 Views)

I think this is not possible but what you can do is use system exec.vi and focus on control you want to shift. Try this(I never tired this)

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 5
(2,867 Views)

I'm not sure about that but maybe you can do that with VI scripting (ibut I think that it's not free !) :

https://www.ni.com/en/support/downloads/tools-network/download.labview-vi-scripting.html

 

To install it in evaluation mode, you can follow those instructions :

https://lumen.ni.com/nicif/us/evaltlklvscript/content.xhtml 

 

Once installed, you can have a look at LV examples by typing "script" in example searcher...

 

0 Kudos
Message 3 of 5
(2,840 Views)

Scripting has been free since LabVIEW 9.0, so most folks can use it now.  Unfortunately, shifting the z-order of panel objects is not exposed in scripting.  The horrible, cludgy workaround is to delete all your controls and recreate them in the z-order you want them.  This would require rewiring their terminals on the block diagram, as well.  If you need this functionality, please kudo this and this LabVIEW Idea Exchange idea.

0 Kudos
Message 4 of 5
(2,830 Views)

You can use this.  Note however that z-order can only be changed on a VI that is in edit mode; you cannot change the z-order of a running VI.

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 5
(2,816 Views)