Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: desertsp on February 22, 2016, 06:37:07 PM

Title: simplified Container view
Post by: desertsp on February 22, 2016, 06:37:07 PM
My workplace recently upgraded to Visio 2013 (yay!) coming from 2007, and I immediately discovered the Container feature. It has some pretty obvious utility, but I'm wondering if it can do 'one more thing'. Take a look at the attached image...or I've tried to describe below what I'm hoping to achieve.

I've drawn various computer programs as containers. Inside each containers are shapes representing the various outputs of that program. I drew arrows connecting the shapes to other containers to indicate dependencies. For a high-level overview, it would be really useful is if I could depict a simplified representation which only connects containers (the second diagram)....but without destroying the underlying connections to the shapes.

Is anyone aware of a way to accomplish this in Visio 2013? I'm willing to use VBA and shapesheets to accomplish this, but am hoping for something out of the box.

Thanks!
Title: Re: simplified Container view
Post by: Yacine on February 22, 2016, 07:17:01 PM
Hi, this definitely feasible, but not out of the box.
Starting point would always be the detailed drawing (obviously).
Assign all connectors to a layer (eg DetailConn)
Find all containers in the drawing, then all shapes. Build a simple array of the form (shape, container).
Iterate through all connectors again and for each find, add a row in a new connector array (eg arOverviewConn =  (parent 1, parent 2)). Don't add a row, if the couple exists already.
Create a new connector for each row in arOverviewConn and assign the overview layer to it (eg overviewLayer).

Now there are different possibilities to switch between one layer and another.
A simple way, would be to implement it in the shapesheet of the page.

HTH,
Y.
Title: Re: simplified Container view
Post by: desertsp on February 22, 2016, 08:21:22 PM
Thanks for the quick response. You confirmed my suspicion that this isn't possible out of the box.

Sounds like I'll need to craft some VBA for this...I appreciate your pseudo-code example to get me started!