Visio Guy

Visio Discussions => Shapes & Templates => Topic started by: perry59 on August 02, 2013, 04:17:16 PM

Title: keep shape on top
Post by: perry59 on August 02, 2013, 04:17:16 PM
I am working on some wiring diagrams (using connectors for the wires) and on these I need to place wire gauge info on top of each wire. I right click the text with the gauge and mark it "bring to top" so that the wire does not go through the text.
problem is anytime a wire gets move or the text gets moved it seems to loose its "on top" characteristic. Is there some way I can make these bits of text ALWAYS stay on top of everything else all the time?
Thanks
Title: Re: keep shape on top
Post by: vojo on August 02, 2013, 07:13:41 PM
couple of options
- group the text and the wire (probably want to do this anyway since moving wire itself could force moving the group)
     - select wire with in group and move it around at will
     - text will be on top   
- put wire and text on different layers....set text layer as top

You might be able to play around with the following to get it to work
    - add a connection point to wire
    - connect text box to connection point
    - since connection point moves (ever so little), it would force the text to move....getting it back on top.

Grouping is similar to how June the seconds iso connectors work (oversized white shadow is behind the color line)
Title: Re: keep shape on top
Post by: wapperdude on August 03, 2013, 03:45:49 PM
Couple of additional points:
1.)  Visio automatically sets the Z-order when placing a shape.  The most recent gets the highest (on top).   
2.)  Within the shapesheet, there isn't really any mechanism to always keep a specific shape on top.  There have been attempts, search for something like controlling z-order on this site.  Believe that includes some tricks.
3.)  Already placed shapes are pretty much "dumb" with regards to newly placed shapes.  Sort of place and forget.

Vojo's suggestions come the closest to what you desire.  Beyond that, it would take some code to search for text boxes and elevate their z-order.  But again, their is no means to give a single setting to each text box that says "we're on top" --  there will always be one at the very top and the rest work down from there.  The layer thing comes closest to making a unified grouping, but, I'm not sure where layers allow setting z-order.

Wapperdude
Title: Re: keep shape on top
Post by: Paul Herber on August 03, 2013, 05:13:24 PM
I have an add-on, Mezzo (Maintain Z Order), that can do this:
http://www.sandrila.co.uk/visio-mezzo/ (http://www.sandrila.co.uk/visio-mezzo/)
Title: Re: keep shape on top
Post by: Thomas Winkel on August 04, 2013, 07:46:10 AM
Please try the connectors from the attached stencil.
New instances are automatically send to back.
Check the VBA code and the "EventDrop" / "EventMultiDrop" cells in the ShapeSheet.

If you don't like to drag connectors from a stencil you could also do this with document events.