Link to home
Start Free TrialLog in
Avatar of Roger
RogerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Scott Helmers
Scott Helmers
Flag of United States of America image

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",
your first formula should begin
     =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.

This doesn't address everything you asked about but goes reasonably far down the path.
ASKER CERTIFIED SOLUTION
Avatar of Scott Helmers
Scott Helmers
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger

ASKER

Many thanks

Kelvin4