fetching information from visio and using in visual studio

HELP.....

ok this is the scenario: I have just made a UML diagram or class diagram and saved it in visio.

Now what i want to do is find out how i can dynamilcally, using coding in C# or VB.NET, load the document in my programs and fetch information from it.

Examples of the type of information i want is : class name, attributes, function names...basically the entire shema or metadata about the class diagram created in visio.

please assist in any way possible

[517 byte] By [KhurramJavaid] at [2007-12-23]
# 1

Hello
If you are looking to write code that interacts with Visio I would suggest that you take a look at the Visio SDK

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vissdk11/html/Doc_Summary_HV01083292.asp

Also of interest may be that you can use the new class designer in VS 2005 instead of Visio

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/clssdsgnr.asp

http://msdn2.microsoft.com/en-us/library/ab7aty24.aspx

Thanks
Brian [MSFT]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.

BrianCombsMSFT at 2007-8-31 > top of Msdn Tech,Visual Studio,Visual Studio Class Designer...
# 2

>If you are looking to write code that interacts with Visio I would suggest that you take a look at the Visio SDK

>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vissdk11/html/Doc_Summary_HV01083292.asp

Actually access to the UML model data is not exposed through Visio SDK API.

There is a workaround albeit not easy and straightforward if you want to get at the metadata programmatically. You could directly generate classes and its members from the model. You'll need the Visio for Enterprise Architect edition for that. Then you could use the Code Model API to get the metadata.

Cheers,

Ramesh Rajagopal.

Visual Studio Team System.

RameshRajagopal at 2007-8-31 > top of Msdn Tech,Visual Studio,Visual Studio Class Designer...

Visual Studio

Site Classified