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

A

antwerp

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;
try
{
stencil = applicationObj.Documents[stencilNameU];
}
catch (System.Runtime.InteropServices.COMException)
{
stencil = applicationObj.Documents.OpenEx(stencilNameU,
(short)Microsoft.Office.Interop.Visio.
VisOpenSaveArgs.visOpenDocked);
}


newMaster =
applicationObj.Documents[stencilNameU].Masters.get_ItemU(masterRouterNameU);
=====================

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.

Thanks.
 

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

Top