Automate Connections from Excel to Visio using VBS

Started by D.Rymkiewicz, April 17, 2013, 08:19:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

D.Rymkiewicz

I am trying to figure out if it's possible to use an existing excel spreadsheet and modify/create a Visio document using the data within the spreadsheet to create the components (using a custom stencil) and map the connections between those components. This is for a client of my company's and would be important for them to be able to add a device or move a device connection by simply adding the device in excel, refreshing the excel plugin in Visio and having the script run to modify or create the document with the correct connections. 

I've attached a copy of the Devices excel spreadsheet to show you how we're currently tracking the port mappings. The second sheet on the excel is the format that I will be moving the entire topology into in order for Visio to be able to map the device properties automatically.

The image I have attached is the way that the Visio currently looks, as you can see, each device has connections on it, 24 port switches have 24 ports, 48 port switches have 48, etc. If I need to figure out the connection coordinates to automate all this, I am willing to do that, but I first need to know if it can be done.

I'm not looking for someone to do this for me, but I would like some direction as all of my current searching and attempts have been, to say the least, fruitless and a lot of banging my head against my desk. A small example would be a huge help, I'm very good at picking up on code and being able to run with it. But here I am lost.

cliff50

Hi,
June has some code that can read an data from an Excel spreadsheet in his submission to automate the drawing of an airfoil
hope this link below leads to it .

http://visguy.com/vgforum/index.php?topic=4740.msg18635;topicseen#msg18635


D.Rymkiewicz

Thanks you two! Looks like a lot of great info for what I need to do. I'll have more time tomorrow to look into programming this monstrosity. I'll follow up and let you know where I get with it.

D.Rymkiewicz

Yeah, wow. Yikes. Is there any way besides using diagram coordinates?! That would be a huge task to undertake (one my client would not pay for) and my boss and I don't think it would be very supportable going forward. (IE: if they add a new network device, server, god forbid an entire switch, or even if someone moves the location of one of the devices on the diagram).

aledlund

You can always consider recommending a third party product such as AssetGen.
Al