Export some meta date from VC#2008 in Visio 2007 Document



Hello. I'm developing the application which convert some meta date in UML
diagrams. For drawing i chose Visio 2007 filetype as the output document.
Now i've got the application which drop classes diagrams in UML with
connections between them (I use Microsoft.Office.Interop.Visio namespace for
it), but I've got one little problem - i can't add attributes and methods to
"Class" shape manually. Could you help me ?

Here's a part of code where i create a master of Class
applicationObj = new Microsoft.Office.Interop.Visio.Application();

applicationObj.Documents.Add("UML Model Diagram (US units).vst");

const string stencilNameU = "umlstr_m.vss";
const string masterRouterNameU = "Class";

Microsoft.Office.Interop.Visio.Document stencil;
stencil = applicationObj.Documents[stencilNameU];
catch (System.Runtime.InteropServices.COMException)
stencil = applicationObj.Documents.OpenEx(stencilNameU,

newMaster =

And when I put it on the Visio page i can get
ActivePage.Shapes["Class.1"].Shapes["Operations"], but don't understand how
to add some operations in it.



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question