Change Z-order of Shapes via ShapeSheet

Started by Visio Guy, July 30, 2008, 04:10:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

New topic, split from post by: david

I have a group of two lines. In some cases I want the first line to hide the second line (to be in front of it) and in other cases I want the other line to be in front.  What's the command for doing that (in the ShapeSheet not VBA)?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Visio Guy

Answer from vojo:

Probably easiest way is to have an action button (and marker) set a variable to indicate which
line to hide (either has nolines = true vs false in the geometry...or...set transparency to 100% to
hide the given line.  Ie set one line or the other as 100% transparent....or....you could get slick and
the line you want to hide set the begin and end to the same values, I think will work).
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Visio Guy

You can allow the user to "Bring to Front" or "Send to Back" using the DoCmd function, a proper id, and a right-click Action or Double-click event.

Technically, you can't control z-order via the ShapeSheet, but with clever tricks, you might be able to get bring-to-front and send-to-back to fire (via DoCmd) in reaction to changes in ShapeSheet data. The thing is, these z-order operations operate on selected shapes, so if your shape's data changes when the shape isn't selected, you won't get the desired results.

Ie: it's "slightly" possible, but probably won't be dependable.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

zhuravsky

There is one trick:
If one of the line will be usual memeber of the group and other line will be created in Geometry section of group shape you can use DisplayMode in Goup Properties section of ShapeSheet for changing Z-order.
(Sorry my English)

Visio Guy

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

using the docmd only works as "push to back"   A shape cannot do a docmd that affects another shape (bring other to front) and since the only way to select this shape is that its in the front already.

The group level geometry and subshape geometry is a good idea.