Visio Stencils Library for Wiring Diagrams

A lot of professionals rely on AutoCAD or other CAD-based tools for broadcast facility design. Visio is typically used for making concept and workflow drawings, sometimes also for network and rack diagrams. But can we use less expensive tool for more design tasks? Despite scepticism I think that Visio has good chances. It’s very flexible software, it can be used as a replacement of other CAD systems in some cases (not all, of course), but require some kind of tweaking.

screenshot.32-1

“Look & feel” of Visio is very different than CAD ones. Many CAD users prefer to use bright lines and dark backgrounds; it’s much more eye-friendly. Visio is WYSIWIG-style diagram editor, there is no simple way to change or switch background and grid colors. Well, it is partially possible: in Visio 2003 background color can be changed in options, but not in other versions: it’s always white. Grid color still can be changed in registry (HKCU\Software\Microsoft\Office\…\Visio\Colors). Anyway, it’s just inconvenient to restart Visio every time just to change a ‘look’. Starting from version 2007 there is the powerful theme ‘engine’, so why not to tame it? In my template I decided to use a small set of very minimalistic themes optimized for wiring diagrams, and completely turn off any other themes and effects:

screenshot.22

It’s almost like old-good Visio 2003. Now I can switch only between my themes or turn them off before printing:

screenshot.25

Built-in VBA code changes colors and backgrounds depending on the current theme. It’s not as quick as it works in CAD programs – switching themes may take minutes depending on diagram complexity – but it’s still better than nothing. For a while I haven’t found a better way, fortunately it’s rarely needed. Maybe it will be easier in Visio 2013, or some “hacking” may help?

Small note about colors: it’s more safe to use system and/or custom colors then theme-dependent ones: they’ll always stay the same. Even more: I’m sure that it’s better do not use colors at all to avoid any misunderstanding.

“Feel” is more complex thing, there are many things which CAD users may miss in Visio, e.g. there are no “classic” command line window. But there are some alternatives: as a minimum there is built-in VBA. More advanced technics may include using of PowerShell or Python scripts and VB/C# programming. The simplest way is to implement all the necessary operations as macros in VBA.

The real advantage of Visio is SmartShapes, which may contain some built-in logic, call add-ons etc. I use this feature in my template to implement resizable 2D blocks with variable count of input/outputs and “smart” wires that can detect which blocks they’re connected to and assign matching connector types:

screenshot.27-1

Wiring diagrams are all about boxes and arrows, so there is no need in large shape libraries, they just have to be more universal and flexible. “Component” shape covers 99% of needs; I also added some more shapes:

screenshot.28-1

Each shape has a rich set of data and supported by the VBA code in the template.

There are a lot of complains about ribbon UI in Visio and other Office programs, but I think it’s not so bad and can be really very convenient. In my template I placed most often used macros and reports in a special ribbon tab:

screenshot.27-2

Built-in reporting with export to Excel may be used for making lists of equipment and cables. All the logic is implemented in VBA code in the template file. It’s the simplest way of distribution, but some later after polishing I’ll probably made an add-in to keep all the code in the single place.

Resume: can we use Visio as CAD replacement for wiring diagrams? Yes, it’s possible, some additional templates & code may improve usability a lot. Unfortunately MS pays not enough attention to CAD-like Visio features, paying more attention to visual enhancements. Anyway, why not to try?

You can download template, shapes and sample drawing here. Important note: it’s intended to use with Visio 2010, earlier version do not support some functions heavily used in shapes and VBA code.

8 thoughts on “Visio Stencils Library for Wiring Diagrams

  1. Hi Dmitry,

    Just wanted to follow up with you about the update to Visio 2016. Looks like I am not the only one. 🙂

    I have a copy of 2010 for this file however am running into a few issues one the drawing gets larger. It seems like the UpdateWire() routine gets stuck in an infinite loop whenever I manipulate a connector, or use any of the tools to change wire numbers or component IO. I can break the execution with CTL + BREAK but this causes issues where sometimes the data isn’t updated in the shape details. I am assuming it is only supposed to update the wires which I have changed, but I think it might be running accross the whole drawing, causing it to spin its wheels until Visio crashes.

    Thanks again for all your work, it is great!

  2. Seconding what Jay said. This is awesome, I’d even be willing to buy you lunch (paypal/amazon/google) to get a 2016 update 🙂

  3. I have started to test your solution today and seems to be a good starting point, but already usable, to a great solution.

    many thanks for sharing

  4. Doesn’t seem like the themes work with Visio 2016, I have to re-make everything black with black text if I don’t want the white on black theme.
    Also, the reports just return an error: “There was an error generating this report. The report definition is invalid”
    Your template is amazing otherwise, I’ve been looking for something like this to help with my cable schedules and wiring diagrams without having to resort to teaching myself CAD.

      1. Hey Dmitry, I’m sure you’re well aware that people love your work! and just in case you don’t – I do 🙂

        Visio 2016 is causing me a few issues though. Was there an update on this front by any chance? I’m sure if you setup a donation link, people would be happy to chip in towards helping you along!

        Thanks for your work! it’s amazing 🙂

      2. Hi Dmitry, thanks for your great work! It was a real help. Any chance for an update for Visio 2016? You saved ten of hours, any chance to let me know how to send a bottle?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s