Displaying Shape Dimensions

Started by visioboy, April 27, 2009, 03:40:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visioboy

Greetings All...

I'm trying to display the dimensions of a rectangle shape as the text inside it and have it update automatically when the shape is resized.  So if I start out with a 1" wide by 2" high rectangle the shape text would read "1 x 2".  If the shape is resized to be 3" wide by 2.5" high then the shape text would update to read "3 x 2.5".

I've tried using fields and custom properties but can only get one dimension to show in the shape (ie either height or width but not both).  I'm sure it's something simple I'm missing but I can't figure it out.

Thanks,
VisioBoy

wapperdude

You're on the right track.  Use the Insert > Field and select which dimension you want to appear first, e.g., width.  Then open the shapesheet (Window > Show shapesheet).  Scroll down to the Text Fields section.  In the Value Cell, it should say "Width" without the quotes.  Modify this entry to be something like:  Width & " x " & Height

The ampersands catenate the various entries.  That should do it.   ;)

Wapperdude
Visio 2019 Pro

wapperdude

If you want to have some fun with the text, say, make it scale with the size of the shape, then, go to the Character section of the shapesheet, and in the Size cell, enter this formula:  Width/(TEXTWIDTH(TheText)*10)

Enjoy
Wapperdude
Visio 2019 Pro

visioboy

Pure awesomeness Wapperdude!  Works perfectly.  ;D

Many thanks....

Yacine

#4
Very usefull is also the possibility to insert several fields in one or multiples lines.
To do so, after having inserted your first field, press F2 to edit the text, then either insert a line break (enter) or an empty space then repeat the insertion with another field.

Other solution is to insert a custom formula: width & " x " & height.
Yacine