Author Topic: Change Z-order of Shapes via ShapeSheet  (Read 9926 times)

0 Members and 1 Guest are viewing this topic.

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Change Z-order of Shapes via ShapeSheet
« on: July 30, 2008, 11:10:35 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Change Z-order of Shapes via ShapeSheet
« Reply #1 on: July 30, 2008, 11:12:48 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Change Z-order of Shapes via ShapeSheet
« Reply #2 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.
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

  • Jr. Member
  • **
  • Posts: 46
Re: Change Z-order of Shapes via ShapeSheet
« Reply #3 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)

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Change Z-order of Shapes via ShapeSheet
« Reply #4 on: September 03, 2008, 09:10:20 AM »
That's a really cool tip, zhuravsky!

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

  • Hero Member
  • *****
  • Posts: 1523
Re: Change Z-order of Shapes via ShapeSheet
« Reply #5 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.