views:

83

answers:

1

Hello Everyone,

I have a module that creates a Visio file (VDX) outside Visio. According to the SDK this refers to 'untrusted' XML. I've created my xml file by copied the Masters from my stencil and then refer to them using an XML sparse file.

In my sparse xml I override the shape's location and size this way:

<Shape ID="154" Master="0">
       <Text>Text of the shape</Text>
       <XForm>
         <PinX>2.90625</PinX>
         <PinY>3.895833333333333</PinY>
         <Width F="No Formula">0.75</Width>
         <Height F="No Formula">0.5</Height>
       </XForm>
</Shape>

My shape is a group that has sub-shapes.

It works, Visio is able to open it, but the sub-shapes has the default width and height of the master. Also the links between by shapes don't route properly.

If I copy/paste in the same of new file, then I get the expected result.

I have tried to force the width and height of sub-shapes. I get the same problem.

I have tried using VBA code on opening of the document by explicitly calling the trigger() method of the Cell class and I get the expected results. It also work, I open the shape sheet. The value is there in black, I just hit enter on the cell, and I get the expected result as well.

My understanding of the problem, is that visio does not evaluate the formulas of my sub-shapes when I open the document.

Unfortunately, I cannot rely on macros to force and update the cells. I would like to know if there's a way to force the formulas of my sub-shapes to be re-evaluated when I open my document.

Thanks in advance.

Eric

A: 

See a solution here: http://visguy.com/vgforum/index.php?topic=1199.msg5163#msg5163

Eric Hudon