Z-Order Problem when opening a visio sparse xml created outside Visio

Started by ehudon, September 28, 2009, 10:16:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ehudon

Z-Order Problem when opening a visio sparse xml created outside Visio


Hello everyone,

I create a Visio 2003 XML file outside visio. I create shape by refering its master like this:

<Shape ID="MyId" Master="MyMasterID" />

It works well, but for unknown reason, the Z order of some shape is screwed. It does not apply to all my shape. Look like visio is confused about the order when importing sparse xml. I have been able to manually send the sub-shapes to front.

I would like to know if there's a way to specify that in a shapesheet or anything else?

P.S.: If I drag the same master from the document stencil, everything is fine.

Thanks in advance!

Eric

Visio Guy

Hi Eric,

I think you can control Z-order by the order of the <Shape> nodes. The first node is the back-most, the last is the front-most.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

ehudon

The problem is that I don't have control over the sub-shapes when I create my sparse xml.

This is my code:

<Shape ID="MyId" Master="MyMasterID" />

I did try to override the sub-shapes order by specifying the order the the sub-shape like this without success:

<Shape ID="MyId" Master="MyMasterID" >
    <Shape ID="KnowSubShapeId" />
    <Shape ID="OtherKnowSubshapeId" />
</Shape>


I'm kind of clueless. It works for some shapes and not for others. At first I thought that is was about the number of sub-shapes that I had. But actually I get the problem with shapes that have fewer sub-shapes that other that work and have more sub-shapes.

Has anyone already ran into this issue?

JuneTheSecond

Hi,

In xml file the z-order is defined by the order of lines, but not shape ID.
The last shape in the shapes in group is the shape on the most front. (Image1.jpg)
If you reorder the lines, z-order of the shapes can be changed.

I think shape ID must be a number, but not text string.
Best Regards,

Junichi Yoda
http://june.minibird.jp/