Visio Guy

Solution-specific Visio Discussions => Network Diagramming => Topic started by: cbegin on March 31, 2010, 08:09:29 AM

Title: How to create connection from excel data?
Post by: cbegin on March 31, 2010, 08:09:29 AM
I need to draw a network diagram.
There is a list of 100+ machines and a list of connections(links) between each two (some connect, some not) , which is all collected in Excel, and this information will change from time to time.
So I am wandering whether there is a method in visio for me to relief my work burden.
:-[

Thank u very much
Title: Re: How to create connection from excel data?
Post by: aledlund on March 31, 2010, 10:35:48 AM
Visio has nothing natively that will open an Excel workbook and draw a network diagram, so something would have to be written. The visio sdk has what you need to know about writing code for visio. This example

http://www.visguy.com/2009/04/08/path-analysis-in-visio/

has vba code for reading/writing to excel from visio.
hth,
al
Title: Re: How to create connection from excel data?
Post by: cbegin on April 16, 2010, 04:52:31 PM
Thank you very much.

I modified the sample code, then it worked. It created more than 100 connections between 90 systems.
I used "Rnd()to scatter the bubbles (1 bubble stands for 1 system), but it looks a great mass (as following picture). Most of them overlapped.

I want to devide those bubbles(systems) in different category, then connect them. I hope this will make it easier to read.
How can I use container in visio 2010 to contain different systems (in vba)?  and container will expand as systems number increases

Thank you.
Title: Re: How to create connection from excel data?
Post by: aledlund on April 16, 2010, 07:14:13 PM
That's kind of what this example project does.

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

al
Title: Re: How to create connection from excel data?
Post by: cbegin on April 17, 2010, 02:21:09 PM
al,
Thank you very much.
Can we write code in visio using container? (I'm new to this, only know press alt+F11 in visio to write some simple code.)
The project seems complex to me, soorry.

Title: Re: How to create connection from excel data?
Post by: aledlund on April 17, 2010, 05:44:54 PM
that project is actually part of a much larger project. The differences between doing it in vb.net and vba are pretty much conceptual. They both require the ability to read from a data source (which you've already done), the ability to drop shapes onto a page w/connections (also already done) and finally the ability to add a container and add the dropped shapes to it (which the example illustrates). Some of it of course makes sure we don't put the same object (application/networknode) on the page twice and do not delete an object by mistake. Short answer, yes you should be able to do it with vba and v2010.
al