Author Topic: How to create connection from excel data?  (Read 13490 times)

0 Members and 1 Guest are viewing this topic.

cbegin

  • Newbie
  • *
  • Posts: 6
How to create connection from excel data?
« on: March 31, 2010, 03: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

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: How to create connection from excel data?
« Reply #1 on: March 31, 2010, 05: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

cbegin

  • Newbie
  • *
  • Posts: 6
Re: How to create connection from excel data?
« Reply #2 on: April 16, 2010, 11:52:31 AM »
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.

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: How to create connection from excel data?
« Reply #3 on: April 16, 2010, 02:14:13 PM »
That's kind of what this example project does.

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

al

cbegin

  • Newbie
  • *
  • Posts: 6
Re: How to create connection from excel data?
« Reply #4 on: April 17, 2010, 09:21:09 AM »
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.


aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: How to create connection from excel data?
« Reply #5 on: April 17, 2010, 12: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