The same C# code produces different output in Visio Professional and Premium

Posted by user615993 on Stack Overflow See other posts from Stack Overflow or by user615993
Published on 2012-09-07T14:28:44Z Indexed on 2012/09/08 9:38 UTC
Read the original article Hit count: 188

Filed under:

I have built a simple conversion Add In, but its behavior is unfortunately different with the different Visio Editions (Visio 2010 Professional and Visio 2010 Premium). The Add In takes a Process-Diagram created with Shapes from Stencil_1.vss and creates a new slightly different Process-Diagram with Shapes from Stencil_2.vsd. It loops through a Visio page and for each shape founded creates a new shapes from new master shape (from Stencil_2.vsd) and drop it into the new page. Geometry, captions etc. are the same, only the shape-appearance is changed. Below is the source diagram:

the source diagram

When I run the code into Visio 2010 Professional the swimlane shapes are drawn correctly.

run from Visio 2010 Prof

When I run the same code from Visio Premium the swimlane appearance and layout are mismatched: run from Visio 2010 Premium

Both times i drop the SAME Shape("Swimlane" from the same stencil) into the Page with the SAME Code fragment:

Visio.Master vm = swimlane_stencil.Masters.get_ItemU(@"Swimlane");
Visio.Shape TargetShape = targetPage.Drop(vm, shape_x, shape_y);

How could I ensure, that the code produces any time the same (correct) output? Must I disable any (premium)features in the swimlane-shapesheet?

© Stack Overflow or respective owner

Related posts about visio