Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Visio Guy on July 30, 2008, 11:10:35 AM

Title: Change Z-order of Shapes via ShapeSheet
Post by: Visio Guy on July 30, 2008, 11:10:35 AM
New topic, split from post by: david (http://visguy.com/vgforum/index.php?action=profile;u=85)

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)?
Title: Re: Change Z-order of Shapes via ShapeSheet
Post by: Visio Guy on July 30, 2008, 11:12:48 AM
Answer from vojo (http://visguy.com/vgforum/index.php?action=profile;u=3):

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).
Title: Re: Change Z-order of Shapes via ShapeSheet
Post by: Visio Guy on July 30, 2008, 11:16:26 AM
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.
Title: Re: Change Z-order of Shapes via ShapeSheet
Post by: zhuravsky on September 03, 2008, 04:10:01 AM
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)
Title: Re: Change Z-order of Shapes via ShapeSheet
Post by: Visio Guy on September 03, 2008, 09:10:20 AM
That's a really cool tip, zhuravsky!

Title: Re: Change Z-order of Shapes via ShapeSheet
Post by: vojo on September 03, 2008, 09:26:34 AM
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.