News:

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

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

wapperdude

#20
*** SIGNIFICANT UPDATE ***
This update has some minor bug fixes, adds two macros related to schematic symbol creation, and saves as a template.

A feature:  to add a new schmatic page, duplicate the cover page and delete its contents except the "R" button.  Double click the "R" button, and access the report creation.  Right click anywhere in the page will provide instant access to the 4 macros.

Review background:  this schematic capture scheme uses 2D shapes whose connection points have named rows and uses the D-cell to contain pin labels. It also accepts other pre-defined 2D shapes.

To facilitate this framework, a macro is included that allows the user to create shape symbols that have correct attributes.  The size of the shape is set by the pin distribution.  User sets the pin2pin spacing, and the number of pins on each of the four sides.  At its conclusion, it will ask to label each pin.

Connection between shapes may use either connectors or plain lines.  Both will provide info for connectivity report.  Two macros are utilized with configuring schematic for reporting.  The first does all of the heaving lifting.  At the end it will ask how to display the schematic.

You cannot view this attachment.
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: 231 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1093KB.
Tokens: post-login.
Cache hits: 13: 0.00176s for 26,725 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]