How to dynamically resize UML Object lifeline to match contained text width?

In Visio 2013, using an Object lifeline shape on a UML Sequence diagram, is it possible to configure the shape to dynamically resize the width of the object to match the width of contained text?

Ideally, this should be the default behavior. Currently, the shape width defaults to a fixed 0.75 inch width, and then has to be manually resized if the text is wider than that.

November 17th, 2014 9:56pm

Hi,

According to your description, we may add the GUARD formula in ShapeSheet (Right Click the Object lifeline shape). 

For more detail information, please refer to the following link:

http://peterfi136.wordpress.com/2012/05/16/editing-and-resizing-the-textbox-of-a-visio-2010-shape/

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Or we may try the workaround:

http://blogs.msdn.com/b/visio/archive/2006/08/11/694681.aspx

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
November 18th, 2014 6:22am

Hi George,

Thank you for the reply. Unfortunately, this does not resolve the question.

In Visio 2013, the Object lifeline shape is not prevented from resizing the box using a GUARD formula, so the first suggestion does not apply here.

The second suggestion also does not help, since the approach of editing the shape sheet to add a formula to match the shape width to the text width actually causes more effort than the original problem!

The whole reason I want the shape to resize automatically to match the width of the contained text is to save time when creating UML sequence diagrams. It would take less time to just manually resize the shape every time than it would to manually edit the shape sheet every time.

To resolve this, I am now attempting to edit the master shape for the Object lifeline to apply a new width formula to all new objects by default:

- Create a copy of the UML Sequence stencil and save it as "My UML Sequence" stencil. It is not possible to edit the default stencil that comes with Visio 2013, so I have to make my own copy.

- Edit the stencil, and right-click the Object lifeline shape. Choose Edit Master : Edit Master Shape.

- Under Masters: Object lifeline: Shapes: Sheet.5:Shapes:Sheet.6 select Show ShapeSheet

- Edit the formula for the Shape Transform/Width property to allow the shape width to grow larger than the default 0.75 in.

- Save the stencil

Unfortunately, this doesn't work either. When I next create a new object with that stencil, its shape sheet still contains the old default properties with a fixed with of 0.75 in. There must be an easier way to fix this default shape properties and have the change apply to all new objects.

Craig.

December 1st, 2014 10:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics