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
AutoCAD 2013 Service Packs   17 May, 2013

Service Pack 2 for 2013 full AutoCAD and the LT version have been released. The links are below: AutoCAD 2013 SP2:...More>>Read more Without a Net blog posts>>

Feed
Teaching Old Designs New Tricks   17 May, 2013

Question: What do the QWERTY keyboard, the railroad, and shoelaces have in common? Answer: Their inventors are long gone. The QWERTY keyboard was...More>>Read more PTC Creo blog posts>>

Feed
Ideate - Ideate BIMLink for Revit 2014 now available   17 May, 2013

An update for my favorite Revit tool and most favorite Autodesk reseller. I miss you Bob! ...More>>Read more BIMbuilder blog posts>>

Feed
Discover and Fix Your Vibration Vulnerability with SolidWorks Simulation   17 May, 2013

When I go biking during the summer, I rely on the frame of my bicycle to withstand stresses such as vibration and impact. As I speed down the trail,...More>>Read more SolidWorks Blog posts>>

Feed
Behind the Design: How Words and Sketches Become a Picture Book   18 May, 2013

I bet, next to those dusty engineering and design textbooks on the shelf, you have a few picture books that have led to endless inspiration since you...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