LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Community Nugget, 07/23/2007

Programmatic is not necessary (tho' it would be useful).  Just an easier way to control the order while building the FP.  Maybe something along the lines of the cluster reordering tool?

This comes from several months ago when I had to build a custom dial that had a center position as zero but went increasingly positive in both directions.  The only way to do that is to have two dials, one with reversed numbers.  Both had to have transparent backgrounds and a properly sized FP decoration provided the background for both.  Actually it ended up as a Boolean that would change colors dependant upon the dial value.  The customer also wanted other 'neat' things to happen like changing needle colors, movable markers, etc.  In the final version there were three different dials and two boolean objects all in the same FP area.  Getting all of them to appear in the 'correct' order was a challenge, to say the least.

0 Kudos
Message 11 of 15
(2,571 Views)

 

Hi, some of you knows if it's possibleto use programmatically the distribute objects? as I'm doing my own VI's to dothe same and maybe isn't necessary...

 

Thanks,

Marc. 

 

0 Kudos
Message 12 of 15
(2,012 Views)
I think there should be a method for distributing selected objects (at least in the block diagram, I assume it exists in the panel too), but I don't remember which class it belongs to. I believe it should be accessible after you install the scripting API.

___________________
Try to take over the world!
0 Kudos
Message 13 of 15
(1,998 Views)

A very useful nugget.

 

Is there some way to tell which "layer" a front panel object is on?  I have repeated "move backward" fifty times still never hit the bottom layer.  I know I got "move to back" but layer information is EXTREMELY userful.

0 Kudos
Message 14 of 15
(1,827 Views)

 


@wildcatherder wrote:
 

Is there some way to tell which "layer" a front panel object is on?


 

Not the last time I checked. I believe the request has been made and you can try looking in 2010 (you may need to activate scripting if it's defined as a scripting property), but I don't remember hearing anything about it.

 

There is one round-about way, though - the Selection List[] property returns the reference sorted in two levels - the first level is based on selections you made (i.e. if you select objects and then use Shift to select another group) and the second level (for reasons I can't fathom) is by reverse Z order. So, if you select all the objects on the FP (Ctrl+A) and use that property, you'll get the order.

 

You can also make the selection programmatically (there's a private Make Selection method), but then you would have to parse for nested controls. <vi.lib>\utility\traverseref.llb should have some useful VIs for that.

 

Also, note that you can't select while the VI is running, so you have to have it in edit mode and open a reference to it by name.


___________________
Try to take over the world!
0 Kudos
Message 15 of 15
(1,796 Views)