Connections server

Connections server - connections scanner for Visio diagrams.

ConnectionServer is a bit like the ConnectedShapes method that appeared later, but it provides the programmer with more features and can work with earlier versions of Visio.

Buy on Gumroad

It is a tool for analyzing diagramms. Suppose you want to know how far extends the influence of certain event, reflected in the chart. Or select all sources, prior to the desired effect.

In earlier versions of Visio to obtain such information you had to write macros using methods: Connects, FromConnects, FromPart, ToPart, ToSheet... For beginners it was not an easy task. The task becomes even more complicated if you want to analyze not only the shapes nearby, but related, using recursive methods.

In Visio 2010 adds features that simplify the task of analyzing charts - a method ConnectedShapes. For example, one procedure can get an array of shapes IDs lngShapeIDs, attached to shape vsoShape.

lngShapeIDs = vsoShape.ConnectedShapes (visConnectedShapesOutgoingNodes, "")

Parameters allow you to select the link direction (incoming, outgoing) and the shapes categories.

However, the method returns only directly connected shapes. For analysis of remote shapes again is required a recursive program.

Connection server is an even more powerful tool. It contains greater control and filtering comprises recursive methods contains some additional functions. In addition to the direction of the connectors are recorded directly attached the shapes (without connectors), the shapes belonging to the group affiliation layers and filtering by name master shapes.

Basic functions like ConnectedShapes, analyzes entourage. For example,

Set Result = ConnServ.tstConn (vsoShape, 3,1,1,0,0,"","",0)

returns a collection of shapes Result, the shapes which will meet the following conditions: counted incoming and outgoing communication; communication through connectors; loop; group not to disclose; any connection point; without analyzing the layers and master-shapes; connectors themselves in the collection are not included.

tstConn working with neighboring shapes.

GetGraph method provides a recursive call to the base function, resulting in a collection contains all the shapes incoming or outgoing tree constructed from the original shapes. Example of treatment:

Set Result = ConnServ.GetGraph (vsoShape, 1)

original chart, selected shape.
inbound tree
outgoing tree.

LostConn method used to check the charts and collects all the dangling bonds at-connected to only one end of shapes. The method makes it possible to collect all CreatePaths path between two nodes in a graph, assembled in the picture.

Tool formed as ActiveX dll. During installation, the dll is installed in the System32 folder and recorded. The utility contains the class clsConnServ with several methods that provide functionality.

A typical example of the use of the utility. Suppose we want to count the number of nodes that affect the specified node (shape vsoShape). The problem is solved in the following macro:

Sub tstMoveGraph()

 Dim cC As clsConnServ

 Dim Result As Collection

 Set cC = New clsConnServ 'Creates an instance of the class

 Set shp = ActiveWindow.Selection(1) 'Select initial shape

 Set Result = cC.GetGraph (shp, 1) 'Getting target shapes collection

 Debug.Print Result.Count 'Print result

End Sub

Application programmer need only create an object, do one treatment and interpret the results. A connections server does the rest.

Read more.

Download.

The utility is constantly updated and improved. Stay tuned. At the moment, current version - v1.1.6.