LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can one edit how a Typ Def cluster shows in a block diagram

Solved!
Go to solution

Is there a way to edit the form a typ def cluster takes on the block diagram? I have a typ def cluster made of an enum and variant data element that i use to manage a queued state machine. On the block diagram labview stacks the variables in the cluster making it larger than i'd like. After placing i can move the elements around, but next time i edit the typ def it goes back the default stacked form. The two block diagram forms i'm speaking of are illustrated here. It defaults to the image on left and i'd like it to be in the form on the right.

Annotation 2019-04-10 124857.png

Since there is no block diagram for a typ def i don't know how to force it to any particular layout. Moving the front panel items into different placements doesn't seem to affect it.

0 Kudos
Message 1 of 4
(2,584 Views)

Hi mbayc,

 

did you try to change the autosizing property of the cluster "horizontally"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,579 Views)
Solution
Accepted by topic author mbayc

If you right-click the Cluster on the Front Panel, you can choose how it is organized on the screen by varying the AutoSizing property.  "None" means you can move them around as you wish inside the Cluster boundaries, and they stay put.  "Size to Fit" is similar, but adjusts the (rectangular) boundaries of the Cluster to be as small as possible.  Neither of these first choices adjusts the relative placement of the Cluster components.

 

The last two, Arrange Horizontally and Arrange Vertically, do just what they say, moving the components and placing them adjacent (no space between).  In addition, they might appear to "re-order" the components from the order you might have expected.  [You can either set the "order" as you want, or temporarily turn on "None", carefully re-order as you wish, then turn on "Size to Fit"].

 

Bob Schor

0 Kudos
Message 3 of 4
(2,554 Views)

Additional options:

 

- arrange the typedef definition as you like, then make it "Strict" and apply changes.

- after wiring the constant to something, select it and make a subvi out of it.  You can then make the icon smaller than normal.  You can set it to be inline too.  Possible benefit -- if you drop this "constant" lots of places, all the *values* will stay in sync if you ever need to change them.

- right click the cluster constant and choose "view cluster as icon".   This is my least favorite.  It gives you the bad features of the subvi approach (hides the constant values with a full size fixed-appearance icon) but not the good ones (one common place to update the *value* of this "constant").

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 4
(2,516 Views)