Wiring Diagrams

Started by Bob33S, January 22, 2019, 12:35:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bob33S

I'm rather new at Visio, but I would like to submit a wiring diagram project that I have been working on.
It is not perfect, but a work in progress.

This is a mostly a modification and adaptation (or butcher in some cases) of code from the web site.
Dual Labeled connectors
Text Along a Connector's Path
Smart connectors
Finding sub-shapes in a group
Auto numbering connectors
Just to name a few.

The underlying premise is that everything, except connectors, are a piece of equipment (with a reference designator) and Ports are added to make connections.

When you drop the "Port" shape onto the "Equip" shape it gets data from the "Equip" shape.
The Dual Labeled connectors collect data from the port that it connects to.

There are a few issues that I have not worked out.
I would like to automatically update the "RefDes" in the "Ports" when the "Equip" Shape Data "RefDes" is changed.
I also have problems skipping shapes that do not have a "RefDes" cell.


I would like to thank the VisioGuy, Dmitry and others for the inspiration.


zipwill

Wow - that is really interesting.  Certainly not newbie stuff....

Have you sorted any of the issues?  I will watch with interested as this can apply to me.

Thanks
Tom

wapperdude

QuoteI also have problems skipping shapes that do not have a "RefDes" cell.

You can search a shape for a specific cell to see if it exists: 
    If shp.CellExists(somecellname, Visio.visExistsAnywhere) = 0 Then
          do whatever code
    end ifs

Referrence:  https://docs.microsoft.com/en-us/office/vba/api/Visio.Shape.CellExists
Visio 2019 Pro