Author Topic: Wiring Diagrams  (Read 1694 times)

0 Members and 1 Guest are viewing this topic.

Bob33S

  • Newbie
  • *
  • Posts: 6
Wiring Diagrams
« on: January 21, 2019, 07:35:11 PM »
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

  • Newbie
  • *
  • Posts: 7
Re: Wiring Diagrams
« Reply #1 on: February 06, 2019, 06:48:46 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Wiring Diagrams
« Reply #2 on: February 06, 2019, 04:36:30 PM »
Quote
I 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