Visio Guy
September 08, 2010, 10:22:46 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: How to change shape properties in dynamic groups?  (Read 245 times)
0 Members and 1 Guest are viewing this topic.
Zarty
Newbie
*
Posts: 4


View Profile
« on: July 30, 2010, 06:15:04 AM »

If I have a visio diagram with objects connected to represent, for example, complex access paths between Applications and databases and between databses and other databases (a kind of network), I want to build in some interactive features so that if a Block (representing an application) is selected, all the databases required by that application plus any connectors between them are highlighted. 

For example on the Diagram, if someone viewing it clicks on ApplicationA then all the objects including ApplicationA, DB2, DB3 an DB4 and connectors are filled with a certain colour and/or the line style changed.   Alternatively, if the Block representing ApplicationB is clicked, DB4, DB5 and DB6 would be highlighted as another group... In otherwords, in this simple example, DB4 is both ApplicationA and ApplicationB's groups. 

I was wondering if there can be some action on the Application blocks or Database shapes such that when they are clicked, a record of the related objects can have their properties changed?  Could the Visio database facility be used perhaps?

The reason I want to do this is that the entire diagram of interconnected Applications and Databases is a complex plate of spagetti so being able to highlight specific groups of objects with predermined relationships will be very helpful.    How can I best do this?   Also, assuming it can be done, is there a way that offers the easiest way to keep the underlying information/groupings up-to-date?  Eg. DB10 get's added to ApplicationA's list of required databases.

Clive
Logged

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!

Jumpy
Full Member
***
Posts: 244


View Profile
« Reply #1 on: July 30, 2010, 07:40:10 AM »

You could give all Shapes a user defined cell, for example User.Highlighted. In all format related cells, for example LineColor, you write a formular like =If(User.Highlighted,RGB(255,0,0),RGB(0,0,255)).
Thats the part you have to do in the ShapeSheet of all Shapes.

In the Shapes that can start the Highlighting frenzy you have to use the DoubleClick Event to start VBA Code, at best with CALLTHIS("Code_Name").

The code has to iterate through all shapes and set all User.Highlight cells to False.
Than set the cell of the starting shape to True.
Than look witch connectors are connected to that shape and highlight them.
Than look at the shapes connected to those connectors and highlight them.

This needs a bit of code, but there are examples out there to check pathes of shapes along connectors, that will be a good start.
It will propably a good idea to make parts of the code "rekursiv" (Don't now engl. expression).

Perhaps someone has an idea that works without VBA, but I fear not.

Jumpy
Logged

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!

Paul Herber
Global Moderator
Hero Member
*****
Posts: 753



View Profile WWW
« Reply #2 on: July 30, 2010, 09:25:41 AM »

"rekursiv" (Don't now engl. expression).

recursive !
Logged

Engineering and software stencils and applications for Visio - http://www.sandrila.co.uk/
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!