# Shape sizes controlled by shape fixed lists and position of other shapes

My question concerns shape position and size:
- Maintaining the distance between two shapes though they both change height in response to their content of text.
- being able to set the width of a shape immediately by selecting a size value from the Prop section of the shape sheet.

For details please see the small file attached
Thanks
Kelvin4 Shp-sizes-controld-by-SapLists--.vsd
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Visio Consultant, Trainer, Author, and DeveloperCommented:
A handful of things to get you moving in the right direction, starting with the last question first:

1) Yes, you want to group ABC before creating the master. If you drag multiple shapes into a stencil to create a master, Visio is going to group them anyway. It's better if you do it first.

2) Closely related to #1: it's also better if you create your shape data on the group and have your ABC shapes read required values from the group shape data.

3) Your formula for the width of A isn't working because of the #1, all-time, infinitely most annoying "feature" of Visio shapesheet formulas: You can't compare strings in a shapesheet formula by saying "if X = Y"!! You must use the STRSAME() function. For example, instead of
=IF(Prop.Content_width="large",130 mm,IF(Prop.Content_width="medium",
=IF(STRSAME(Prop.Content_width,"large"),130 mm,IF(STRSAME(Prop.Content_width,"medium"),

4) To position B relative to A, you need to set PinY for B using a formula like this:
=Rectangle!PinY - Rectangle!Height*0.5 - Height*0.5 - 0.01
This sets the center of B to the center of A, minus half the height of A, minus half the height of B, minus an arbitrary number for the separation between the two shapes. If you take the arbitrary number out of the equation, you'll see that the top of B is aligned exactly with the bottom of A.

5) As an alternative to #4, you can let Visio do all of the work for you because you can glue 2-D shapes to each other. Take a look at the purple shapes A and B I added to your drawing. Select A, drag the bottom handle down and you'll see that shape B is locked to it. Try changing the width of A also and you'll see that they remain attached at the center.

0
Visio Consultant, Trainer, Author, and DeveloperCommented:
attachment below....
Shp-sizes-with-glued-2D-shapes.vsd
0

Experts Exchange Solution brought to you by