BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Find Complete Path: shapes and connectors

Started by wapperdude, February 05, 2019, 10:40:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Chalk another one up for new Visio.  The following development finds all shapes and connectors that are interconnected.  It does not differentiate the direction of the connected.  Think of a circuit board or wiring diagram. Component A connects via trace 1 to Component B who's connected to Component C via trace2.  The code allows for connector to connector connections, shapes with multiple connections.

To use, select one object.  It may be either a shape of a connector.  Run macro.  All interconnected objects are highlighted.

The code consists of an interface model that determines the type of connection selected.  It then makes the appropriate call to either of two sub-modules.  One looks for shapes attached to a connector and the other looks for connectors that are attached to a shape.  These two modules call each other recursively.  Each sub-module uses the "highlight" color to avoid endless looping by eliminating already colored objects.  Both modules use the GluedShapes method.

Here's a test / evaluation file.
Visio 2019 Pro

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 138 (show)
Files included: 32 - 1207KB. (show)
Memory used: 988KB.
Tokens: post-login.
Cache hits: 13: 0.00178s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]