Creating duplicate shapes and auto-linking data to the shapes

Started by terryk, March 09, 2011, 01:02:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

terryk

I am trying to create Wide Area Network diagrams for presentations.

I would like to be able to import an excel spreadsheet and auto apply the data by row to a group of identical shapes.  My problem is that I need to name each of the duplicate shapes a different name so that I can import the data automatically.

Just to be very simple, let us take the shape of a building.  I want to duplicate that shape 15 times to represent 15 cities and then import the city names and details for subnets and Wide Area Network Bandwidth.

I moved a building shape onto my document.  Then went to the tool bar, selected "add ons" then "Visio Extras" and then selected number shapes. 

The first time I did this, I was able to then hide the numbers that appeared on the diagram.

I then created an excel spreadsheet and used the "Number" field to relate each row of data to the individual shape.

This worked better than anything else I have tried before, but somehow I ended up with the Shape Name (in this case, my auto numbers) showing up on my diagrams and can't get them to go away.

So, my question is this:

What is the best way to duplicate a shape and have each shape have a unique name that does NOT have to show up on the diagram.  The purpose being to be able to auto link data from each row to multiple similar shapes on my diagram. 

Thank you in advance for your time.

aledlund

"What is the best way to duplicate a shape and have each shape have a unique name that does NOT have to show up on the diagram.  The purpose being to be able to auto link data from each row to multiple similar shapes on my diagram.  "
That's an easy one, rather than using a name (since the diagrams will be unique and on a single page) instead use the shapeid.
The drawing (as you described it) can be a simple polar arrray. John Marshall (visio.mvps.org) has some example code that was originally written by Chris Roth on his site.

http://visio.mvps.org/VBA.htm

An example of the process you might look into is over here.

http://www.youtube.com/watch?v=3YHc5ZJrXas

a more advanced discussion of using something more advanced is over here (obviously need to change the data layer to support your layout and change the drawing module from laying out hierarchies to polar arrays). Since the example uses record pointers rather than user fields it can be easily adapted to drawing most tree structiures (ethernet/tcpip structures).

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

al