Hello,
first of all, please excuse my bad english.
We have developed our addin for MS Visio since many prior Visio versions now. Now, with Visio 2013 we encounter serious problems, i will try to describe here.
We have 3 shapes with user defined properties. With the code in our solution we are able to combine these shapes together without loosing the user defined properties. The result may look like this:

Unfortunately under Visio 2013 we get one of the following results:

I will describe what we do in CodeBehind to achieve our goal:
All 3 shapes are selected and then via context menu there is a QueueMerkerEvent fired to which our code is reacting with the following logic:
- first shape of selection gets duplicated via
shape.Duplicate() and we get the resulting shape we call now
vShapeNew - now for the Initial selection we make a
Selection.Union() which results in another shape we call now
vShapeUnion - in shape
vShapeNew we delete all sections in GeometrySection with
vShapeNew.DeleteSection(CShort(Visio.VisSectionIndices.visSectionFirstComponent)) - now we iterate through all GeometrySections in
vShapeUnion and do the following for
vShapeNew• we create the same section with
vShapeNew.AddSection(CShort(iSectionGeometry))• for each row in this section of
vShapeUnion we create the same rows in
vShapeNew with
vShapeNew.AddRow(CShort(iSectionGeometry), CShort(iRow), 0)
iType = vShapeUnion.RowType(CShort(iSectionGeometry), CShort(iRow))
vShapeNew.RowType(CShort(iSectionGeometry), CShort(iRow)) = CShort(iType)• for each cell in this row we copy the values of
vShapeUnion into
vShapeNew with
vShapeNew.CellsSRC(CShort(iSectionGeometry), CShort(iRow), CShort(iCell)).FormulaU = vShapeUnion.CellsSRC(CShort(iSectionGeometry), CShort(iRow), CShort(iCell)).FormulaU - at the end of our code we delete the
vShapeUnion with
Shape.Delete()Resulting is an union shape with same user defined properties as before.
What i found out was that its always one point inside the Geometry which seems to have one value wrong in one cell (either the X or Y coordinate). Which point this is depends from the order in which the shapes gets selected initially. In new Visio 2013 ShapeSheet works with relative positions (RelMoveTo & RelLineTo), but this does not to be the problem.
Which definitely is a problem, that sometimes (not always, i did not find out when it happens and when not) Visio 2013 does not delete the geometry section where it does delete under Visio 2010. The SDK for Visio 2010 (i dont have one for Visio 2013 yet) says, that deleting of section fails, when there is not section with this ID. But why has the same file with the same shapes, and when i duplicate a shape under Visio 2010 and Visio 2013, that the resulting shape has different geometry IDs?
Right now, i am quite stucked, and we can not provide our addin for Visio 2013.
Does anyone have any idea, what we can do here, without waiting for Visio 2013 SDK and then make code changes and compile a different Version for Visio 2013, which i wanted to avoid if possible.
I know the code above is quite suboptimal, it was created years ago.
I am asking why the code works fine for Visio 2002, 2007 and 2010 but does produce different results under Visio 2013.
If wanted, i can provide a small test solution (VSTO addin under VB.Net) for exact this Problem.
Just for your Information, i posted the same questions some minutes ago in MS Forum. There are not many VIsio Gurus out there, i just wanted to be sure, that i can reach as many as possible of them
