Schematic capture schema: connectivity, reports, diagnostics

Started by wapperdude, February 17, 2015, 11:27:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

Major code upgrade.  Corrects some errors caused by absence of named rows in the Connections section of shapesheet.  Makes this more universally applicable.

The code is easier to follow and more steamlined. It uses a dynamic array to store info rather than the placing them in user section of the lines and connectors. 

The main macro also will highlight floating connectors and lines, that is, those that only have one end connected.  Additionally, if a connector or line are connected to another connector or line, a dot is added to show connectivity.  Thus, there are two visual aids to indicate lack of connectivity.  Line color and no dots.

The ship to / from Excel macros have not been updated to work specifically with the new macro.  So, that would take some additional effort.

Wapperdude
Visio 2019 Pro

wapperdude

Full update attached.  This will now accept shapes with or without connection points, i.e., walking glue points are OK.  These are reported as "PinX".  The added connection points may either be un-named or named.  The report lists by page, then by 1D "connector".  Each connector row lists To/From shapes and info about the connection point.

As before, there are various options that may be "activated" within the subroutine, e.g., to delete all non-connected 1D shapes.  Floating connectors, i.e., just one end glued, are colored yellow for visual identification.  The program will add "dots" where two or more 1-D connectors are attached to each other.  If connectors are colored, their coloring is preserved.

There is ONE main macro to run, 3 subroutines in all.  The main sub does all of the connectivity analysis.  Info is stored in an array.  The export to Excel sub is called when analysis is completed.  That sub will export connection data to Excel, and then formats the worksheet.  There is a new worksheet for each Visio page.  The Excel window is normally not viewed, but options at end of macro can be chosen for viewing / manual saving / closing.  This sub-routine will call final subroutine to import Excel formatted worksheets back into Visio.

This final macro will call back the Excel worksheet, and paste it to a new Visio background page.  There is one new page per Excel worksheet, which means there is a corresponding Visio foreground page.  Worksheets are on background pages which excludes them from connectivity analysis.  Note, if there is a huge amount of connectivity on any given page, the Excel import may fail, i.e., get truncated.  For such cases, the saved Excel file will have all information.


This connectivity analysis system should be very generic and work with most any Visio drawing...but, I've not tested the validity of that statement.

Enjoy.
Wapperdude
Visio 2019 Pro

wapperdude

Well, one more update.  This is to the Excel sub module.  Added the ability to automatically save the Excel generated file.  It will grab and use the name of the Visio file, and then save in the same directory as the Visio file.

Wapperdude
Visio 2019 Pro

wapperdude

Here's example of using macros to add connection points around a shape.  It adds 2 points per side.  The code has the basic steps to add either normal connection points or named connection points...two separate macros.  The number of points is "hard coded", as the effort was focused on the fundamental steps of adding the points.

This was written for V2007, but should work with other versions.  Newer versions might have enhanced features not available with V2007.  Also, I think V2007 has a "bug" wrt named connection points.  Namely, you cannot specfy the connection point behavior via cell "C", i.e., inny, outy, or in/out.  All you get is an "in" point type.  You can manual place an entry into the cell, but it has no consequence upon connection point behavior.

Wapperdude
Visio 2019 Pro

wapperdude

Here's updated shape.  Pin5, and only pin5, have text (label, pin number) shapes that incorporate SETATREF functionality.  So, the pin text will follow the location of the pin, but, the text may also be independently placed relative to the pin location.

Wapperdude
Visio 2019 Pro