Manufacturing

Avatech Tricks: Hotwire AutoCAD Electrical

15 Sep, 2005 By: Carl Smith Cadalyst

Customize AutoCAD Electrical to make drawing point-to-point wire diagrams more productive


Out of the box, AutoCAD Electrical may seem as though the product is strictly geared toward ladder-style diagrams and panel layouts. But you can easily modify the program for all sorts of electrical controls design, including point-to-point wire diagrams (figure 1).

figure
Figure 1. A typical point-to-point wire diagram.

Typically, a point-to-point diagram will contain wires of several different colors and gauges. By default, you will need to switch to the appropriate wire layer each time a different gauge or color is required. This process can take extra time and effort if your design contains many layers or includes many types of wire gauges and colors.

Creating a custom toolbar to automate this process can greatly enhance point-to-point design productivity. Our toolbar will create the appropriate layer if it does not exist yet, make that layer current and then launch AutoCAD Electrical's Insert Wire command.

AutoCAD Electrical looks for lines drawn on specific layers and defines these lines as wires. Once the wires are identified, the software can automatically create several types of wire reports, including from/to lists, as well as automatically assign unique wire numbers to each wire network. In the AutoCAD Electrical configuration tools, I used a wildcard to tell AutoCAD Electrical that any layer that begins with 8AWG is a valid wire layer (figure 2). The next step is to create a custom toolbar that will make it easy for me to choose the wires I need on the fly.

figure
Figure 2. Selecting the layers beginning with 8AWG as valid wire layers.

figure
Figure 3. Our example toolbar with a simple set of wires.
This toolbar will be a simple starter set of wires (figure 3), but you can create a much more complex toolbar, with flyouts perhaps, that would include all of the wire gauges and colors that would be appropriate for the design.

I named the new toolbar "My Wires" and included buttons on the toolbar and color-coded each to match the appropriate wire color. I can use these buttons to draw blue, red, green and brown 8-gauge wires.

Each button is customized to execute the following command:

^C^C(if (tblsearch "LAYER" "8AWG-BRN") (command "-layer" "C" "46" "8AWG-BRN" "") (command "-layer" "N" "8AWG-BRN" "C" "46" "8AWG-BRN" ""))(command " layer" "S" "8AWG-BRN" "")(if(not wd_load)(if(setq x(findfile "wd_load.lsp"))(load x)))(wd_load);wd_inwire

This string will search the current layers of the drawing for a layer named 8AWG-BRN, and if it does not find the layer, it will create it and make that layer current. Next it will launch the AutoCAD Electrical WD_INWIRE command to begin drawing a line that AutoCAD Electrical will interpret as a brown 8-gauge wire. Each button contains the same macro, tweaked just slightly so that the appropriate layer name and color will be created.

Now, rather than constantly digging through the layer list each time I need a new wire gauge or color, I can simply use to my new custom toolbar and let the macro do all the work!

That's all there is to it. You need only to configure AutoCAD Electrical to understand your wire layer naming convention and create your own set of custom toolbars. Tweak the macro to suit your needs and you're ready to wire.


About the Author: Carl Smith


AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
My ConnectMyDNA Results   21 May, 2013

my unique gene...More>>Read more It's Alive in the Lab blog posts>>

Feed
TERA Semicon Drives Its Own Destiny with CAD and PDM   22 May, 2013

When you read the history of TERA Semicon, you can see right away that the company has had a strong vision and direction from Day 1. The South Korean...More>>Read more PTC Creo blog posts>>

Feed
Autodesk Revit Server 2014 - Now available for subscription customer download   20 May, 2013

Collaborate...coordinated... seamlessly... integrated...team...Wow...sounds awesome. Know anyone using...More>>Read more BIMbuilder blog posts>>

Feed
SolidWorks Simulation Tips: Parameters and Design Studies   22 May, 2013

In my opinion, one of the most underutilized tools in SolidWorks Simulation is the Design Study.  Design studies allow you to easily set up a...More>>Read more SolidWorks Blog posts>>

Feed
New Adventures in Cutting Tape: The Liquid Tape Cutter by Kouichi Okamoto   21 May, 2013

Invented just one year after the invention of Scotch tape in 1930, the tape dispenser is a unique package design-tool hybrid that can be found in...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters