News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Shapes do not stay in given z-order after save and open

Started by stanbriggs, July 14, 2021, 05:27:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

I tried a couple different things, most failed.  But at one point in saving, Visio asked if I wanted to preserve Z-order.  I said yes, but that made no difference.  So, the clue is in the saving process.

The only, and very ugly, work-around I discover to be effective was to ungroup and then re-group.  That did save correctly.

Would be nice if anyone else would try and verify this loss of z-factor when adding shape to group.
Visio 2019 Pro

wapperdude

Final note:
I was able to narrow this down.  If you drag and drop a grouped shape from a stencil, then add another/replace a shape to the group the "new" shape appears on top.  That's normal.  You can then subselect into the group and move the shape to the back.  This again is normal.  Save the document.  Close the file.  Re-open, and Viola! the z-order is incorrect.  The new subshape is at the very top visually.  Ergo, the problem.

Had the dragNdrop group been ungrouped and then regrouped (this is typically a bad idea/thing to do), then add new shape, send to back.  Repeat save, close, open, and all is well. 

I don't recall this being a problem in the past.
Visio 2019 Pro

Paul Herber

Defo reproducable here in Visio 2016, but in V2010 it's ok.
I took one of my large grouped shapes, placed a rectangle next to it, selected all, added to group. In the Drawing Explorer, found the added shape (Sheet.26 in this case), Send To Back, saved file in VSSX format. Reopened file. New shape is back on top.
Had a look using my Utils -> Grouped Shape Report.
When the new shape is added to the group, it becomes Sheet.26 and is the last shape in the grouped shape list report.
Send to Back: report now shows Sheet.26 in position 1, i.e. it has been sent to back.
Save, Reload ...
Report now shows Sheet.26 back to being the last shape in the grouped shape list.
Now repeat in V2016 but save in .VSD format. All is ok. It is the VSDX format save that is &%£@*&$  wrong.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

wapperdude

Visio 2019 Pro

wapperdude

Interesting addendum to Paul's findings. 

First, I confirmed that VSD does get it right.  But then, resaved the VSD file as VSDX.  Right?!?  After all, the VSD is now correct.  Busted.  The VSDX file still gets it wrong!!!
Visio 2019 Pro

Visisthebest

Excellent investigation of a clear Z order issue with subshapes!

I wonder where Z order is stored in the XML of a VSDX file, this may be a way to fix it by editing the XML in the file.
Visio 2021 Professional

Paul Herber

Each shape has a .index property, that is the Z-order.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Visisthebest

Yes I forgot Paul, I would be afraid to change the index number in a VSDX file's XML, maybe other data is referencing it or just the shape ID?

Can certainly try to experiment with it with a test file, who knows this might solve the issue.
Visio 2021 Professional

Visisthebest

Ok so this new issue here: http://visguy.com/vgforum/index.php?topic=10233.0

Is related to this issue from 2021!

My problem is data graphics, when added to a group shape, are covered by the subshapes in the group.

What I just discovered is, after I save a VSDX and reopen, the order is fine again and the subshapes are covered by the data graphics!

So in my case saving fixes the issue, although it is not a very good fix. I will continue to investigate, also looking at the XML.

Visio 2021 Professional

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 290 (show)
Files included: 34 - 1306KB. (show)
Memory used: 4286KB.
Tokens: post-login.
Cache hits: 14: 0.00268s for 26,715 bytes (show)
Cache misses: 4: (show)
Queries used: 16.

[Show Queries]