Generating Diagram of XML Data using C#

Started by a.beaulieu, March 24, 2011, 08:54:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a.beaulieu

Hi, hope the question will be understandable!?!

I have a XML file and I want to generate Diagram to represent it.

My plan is to program a C# add-on with VS2010, for Visio2010
On a click of a button I will select one of the XML files, and diagrams will be generated.
Then I can move around the diagram.
Once properly place, and click the next button, it would add relationship between the entities using the XML files.

I did not manage to find how to call the diagram, in fact I did not find many tutorial to guide me in the direction I planned.

aledlund

Let's look a little deeper into what you are asking for and some possible requirements; "I have a XML file and I want to generate Diagram to represent it". Infers that you have a schema with at least two data structures, one of nodes that need to be connected and one of connections that you want to import. There is at least one sample in the visio sdk that uses C# with an XML input (the office plan sample), it's not an add-on but the necessary information flows are there.

This post has example XML code for moving information in and out of a Visio document.

http://visguy.com/vgforum/index.php?topic=2298.0

and this site

http://www.developerfusion.com/tools/convert/vb-to-csharp/

can convert the vba code to C#

al