-
Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.
-
Index to 100+ AutoCAD Electrical Utilities
April 14, 2009 12:36 PMby Nate HoltThis blog's three years went quickly. It's been fun. I really appreciate the privilege to (try to) respond to your questions and suggestions.
About a six months ago I posted a simple index to the 86 or so utilities that had been published on this blog in its first year. Now, we're up to about 108, so here's an updated list (starting with most recent).IEC-style Wire Numbering
Quick customize Right-Click context menu - move Delete component to bottom
Panel footprint cross-reference annotation from schematic parent
Generic title block update tool
Importing Wire Types from a master schematic
Adjusting the 'Jag' in split-lines of PLC I/O modules
Flipping Form-C contact pin assignments
Reorient Wire Color/Gauge labels
Pre-positioning cross-reference annotation
Flagging source/destination wiretype mismatches
Quick, Project-wide SYSVAR report - using dbx calls
Parametric PLC database Find/Replace
Auto title block update using 'Diesel' fields
Auto-create Project-specific catalog lookup database file
Enhancing Circuit Builder with User-defined functions
Customizing the Project Manager window
Processing multiple sub-projects (Super-project work-around)
Boosting AutoLISP performance
Tallied Wire Count report
Wire layer lister tool
Parametric Connectors in AutoCAD Electrical
User-post to import component descriptions into Wire From/To reports
Pushing Wiretype user settings to signal arrow attributes
X-Y Grid-based Wire Numbering - based on pick points
Undoing 'Do not show me this again'
Circuit Generation by Layer Combos On/Off
Concatenations in Title Block update
Match Wire Number text to Wire Color
User-post to alter sort of 'By Tag' BOM report
Extra wire number display - on component connections
TIP: Terminal Strip Editor - speed-up
Voltage drop calculations
Backwards tagging from child to parent
Troubleshooting missing icon menu images
Calculate motor FLA and Starter Size - AU2007
Block list to a spreadsheet
Simple drawing parser using AutoLISP - layer list to a spreadsheet
Unconventional use of Wire Gaps
Auto-adjust Drawing Index report
Drawing List report and 'user post' example
Conduit fill calculation / reports
Color assignment per layer - switch utility
Control of pin text size in graphical cross-reference
Presetting your Surfer 'Zoom' factor
Constructing an AutoCAD Electrical project 'ZIP' utility
Updating drawing set parameters from the Project's scratch database
SS->PLC I/O utility - adding auto title block update
European-style Terminal/Cable connection charts
Matching cable tag-IDs to connected components
Auto wire number tag removal on cabled wire networks
Flipping attribute justification on a mass scale
Customizing the Drawing Index Sheet
Vectoring existing projects to reference ACE 2008 libraries
Flipping to In-line wire number tags
Wire angle connections to dots - simple swap utility
Titleblock Update - Previous/Next Sheet Numbers
Tracing Polyline-connected Components
Recovering Corrupted Wiring in AutoCAD Electrical
Making the Part Number fit the Relay Contacts used - AutoCAD Electrical
Smart Title Block Swapping with AutoCAD Electrical
Component tagging by "Pick Order" in AutoCAD Electrical
Terminal Plan report - controlling the "field" wiring side in AutoCAD Electrical
Auto-mapping "Power" and "Control" contact pin assignments in AutoCAD Electrical
Updating AutoCAD Electrical "Web links" - Pat Murnen's neat solution
Enhancing AutoCAD Electrical's Tabular Terminal Strip Layout
Bypassing AutoCAD Electrical's Automatic Wire tag-ID assignments
1-line Diagrams and linked MCC layouts: AutoCAD Electrical
Creating Special Wire From/To Annotation - AutoCAD Electrical
Repeating In-line Wire Number Tags with Auto-update
Discrete Cross-referencing on Large Schematic Symbols
Writing to Block Attributes in un-opened Drawings - Example App
AutoCAD Electrical's Modify Symbol Lib util - Pushing it beyond its limits
Linking AutoCAD Custom Drawing Props back to AcadE Proj Mgr
When one Tag-ID isn't enough
Comparing project defaults to all drawings at once
Incrementing Line References - customizing the "user" symbol
How to pull the 10 "user" attributes on a wire number into the From/To report
Terminal assignments based upon Cable core indices
Wire From/To - limiting to certain component type
Catalog Lookup - Browsing on Internal vs. Manufacturers part numbers
Altering the twist in Twisted-pair symbols
How to Alias AutoCAD Electrical commands using the ACAD.PGP file
Multi-wire Bus Command - controlling the default count and spacing
Wildcard Filtering in Reports
BOM Report + Component DESC1-3 Text
Multi-Language Electrical Component Tagging
PLC I/O Wire Numbering based upon "Slot" + I/O Pin Number
Catalog Lookup - table name confusion
Edit Wire Number Dialog - Tip: holding in new position
Example of mass update of SHEET assigments
Automatic Display of Internal Part Numbers on Electrical Components
Angles to Dots (IEC angled tee symbols to dot conversion)
Special PLC Address-based Wire Numbers
A couple SS->PLC I/O Tricks - Pin number assignments
Migrating PLC point descriptions back to overall module representation
Dual Catalog Lookup: Preferred and Everything else
Mirror Tears - flipping orientation of inserted components
Customized INSERT PLC Module Command
User Struggle with Reversing Starter - WDTAGALT approach
Adding unused core/conductors to Cable From/To report
Flipping between "Shop floor" and "Customer" tags
Instant "Tags used" listing
Attribute Edit > 255 characters ( ? )
Rolling your own brand of Signal cross-reference annotation
Writing relay contact references grouped by catalog number out to Excel
ACE2006/2007 project file compatibility with ACE2004/2005
Hiding subsets of rarely used catalog lookup entries
Multiple ASSYCODE trick
Trick with Type 0 Pin list
-
IEC-style Wire Numbering - AutoCAD Electrical
April 13, 2009 01:48 PMby Nate HoltThough not a specific option, IEC-style wire numbering with suppression of INST and LOC prefix values when match drawing defaults is possible. The work-around is described below.
The driving force behind this request comes from Miles Nicholson, Aceri UK. His customers often must deal with dozens of repeated, cookie-cutter circuits where wire numbers are to be the same from instance to instance - though the different wire networks with a common wire number are not connected.A good example might be repeated, standard circuits found in motor control center documentation. Each circuit is contained within its own "cubical" of the MCC with only a few control wire connections leaving it to go elsewhere. Here is what the customer wants to see for wire numbering:

The Problem
Assuming that there are a dozen drawings in the project, each with a circuit as shown above (but with different motor numbers), there are going to be twelve wire number 9's in the project set, twelve wire number 11's in the drawing set, twelve motor leads labeled 2 in the drawing set. AutoCAD Electrical is not going to want to repeat wire numbers.
Miles' Solution - Step 1
The first step of the solution is to set up AutoCAD Electrical to add an IEC-style "INST/LOC" prefix to each wire number. The INST and LOC values can be set up as drawing-wide defaults from "Drawing Properties" dialog. For example, the INST value might be "MCC2" to designate that the drawing is associated with Motor Control Center #2. The LOC assignment might be the circuit's cubical location within MCC2. For example, LOC = "C4" might mean that is it in the third vertical section ("C") and the fourth position down from the top (i.e. "4").

So, for each drawing (one MCC cubical circuit per drawing), the drawing INST/LOC defaults are set up to identify the MCC "installation" and the cubical "location" within the MCC.
Now, on this same Drawing Properties dialog, Miles sets the wire numbering format to include the IEC "Inst" and "Loc" flags (%I and %L) as a prefix to the generated wire number (the %N part of the wire number tag format).
Now, with all this in place for each drawing that has a cubical schematic drawing, we're ready to do project-wide wire numbering. Since each drawing's INST/LOC combo is unique and each drawing is set to sequential wire numbering starting at "1", Miles ends up with common wire numbering for each circuit except for the INST/LOC prefix. Here is one of the drawings with the unique "=MCC2+C4" prefix on all of the assigned wire numbers.

Step 2 - Stripping off the LOC and/or INST prefix when match drawing defaults
Final step requires a small AutoLISP function that makes a number of calls into the AutoCAD Electrical "API". This little tool will process one drawing at a time. It will read the drawing's default INST and LOC assignments (what user previously entered from Drawing Properties dialog and saved on the WD_M block). Then it will process each wire number it finds. It looks for a wire number match on the INST value. If found, it strips that part off of the wire number. Then it does the same for the LOC value. If match, it strips off that too.
The net result is that any wire number that exactly matches the drawing default's INST/LOC values will end up being restored to a bare wire number. But any wire number that comes from some other location (i.e. will have a different INST/LOC prefix combo), will remain unchanged ( ! ). Pretty cool.

Here is the little AutoLisp utility. Note that you can modify this utility to either work on all wire numbers or on just those that are not marked "fixed". Comment out the appropriate line, about 18 lines down.
; ** 12-Apr-09 NEHolt reworked to look for drawing-wide INST/LOC assignments
; ** 16-Feb-08 NEHolt fixed typo in original
; ------- W N U M _ R M V _ I E C _ S U F F I X . L S P ------
(defun c:rmv ( / ss delim_char slen ix wnum_en pos wen newnum attrname)
; PURPOSE: remove IEC wire number suffix when INST/LOC values match up
; with drawing-wide INST/LOC assignments... leaving just bare wire number.
; This works on both normal wire numbers and in-line wire numbers. It updates
; any extra wire number "copies" as well.
; Note: this will process and modify just "normal" (i.e. non-fixed) wire numbers
; unless adjustment made immediately below.
; ************
; To process both normal and "fixed" wire numbers, uncomment line "WIRENO*" and
; comment out the "WIRENO" line.
; To process just "normal" wire numbers and leave "Fixed" untouched, uncomment
; the "WIRENO" line below and comment out the "WIRENO*" line.
; (uncomment just one of the two lines below - remove the line's leading ";" character)
; (setq attrname "WIRENO*") ; uncomment this line to process both normal and fixed
(setq attrname "WIRENO") ; uncomment this line to process just "normal" (fixed untouched)
; ************
; Search for schematic wire number instances. This includes in-line wire number
; instances.
(setq ss (ssget "_X" '((-4 . "<AND")
( 0 . "INSERT")
( 2 . "WD_WN*")
(-4 . "AND>"))))
(if (/= ss nil)
(progn ; active drawing carries some wire number instances. Continue.
; Get drawing-wide INST and LOC assignments
(wd_cfg_read_dwg_params) ; read the WD_M block and set GBL_wd_m global
(setq inst (nth 52 GBL_wd_m)) ; get INST from drawing properties
(setq loc (nth 53 GBL_wd_m)) ; get LOC value from drawing properties
(setq slen (sslength ss))
(setq ix 0)
(while (< ix slen)
(setq wnum_en (ssname ss ix)) ; get wire number entity
(setq ix (1+ ix)) ; increment for next time
; Get wire number text (either WIRENO* or WIRENO attribute name)
(if (setq wnum_val (c:wd_getattrval wnum_en attrname))
(progn
(setq save_val wnum_val) ; save copy for comparison later
(if (AND inst (/= inst ""))
(progn ; Look for INST prefix on this wire number string
(if (= (substr wnum_val 1 (strlen inst)) inst)
(progn ; Exact match with INST value. Strip it off
(setq wnum_val (substr wnum_val (1+ (strlen inst))))
)
; ELSE
(progn
(if (= (substr wnum_val 1 (1+ (strlen inst))) (strcat "=" inst))
(progn ; Exact match with "=INST" value. Strip it off.
(setq wnum_val (substr wnum_val (+ 2 (strlen inst))))
) ) ) ) ) )
(if (AND loc (/= loc ""))
(progn ; Look for LOC prefix on this wire number string
(if (= (substr wnum_val 1 (strlen loc)) loc)
(progn ; Exact match with INST value. Strip it off
(setq wnum_val (substr wnum_val (1+ (strlen loc))))
)
; ELSE
(progn
(if (= (substr wnum_val 1 (1+ (strlen loc))) (strcat "+" loc))
(progn ; Exact match with "=INST" value. Strip it off.
(setq wnum_val (substr wnum_val (+ 2 (strlen loc))))
) )
) ) ) )
(if (/= wnum_val save_val)
(progn ; Something was stripped off. Push bare wire number back
; out to the wire network.
; Remove any leading "-" prefix on the wire number
(if (= (substr wnum_val 1 1) "-")(setq wnum_val (substr wnum_val 2)))
; Now get the entity name of the wire that passes under this
; wire number instance.
(if (setq wen (car (c:ace_wnum_find_wire_en wnum_en GBL_wd_trp)))
(progn ; Found it. Push revised wire number back out. Update
; any extra wire number "copies" found on the wire network.
(princ "\n")
(princ save_val)
(princ " --> ")
(princ wnum_val)
(c:wd_putwn wen wnum_val)
) ) ) ) ) )
)
(setq ss nil)
)
)
(princ)
)Download it here. files/26701_26800/26711/file_26711.lsp Copy it to some folder that is in your ACAD support path and rename it wnum_rmv_iec_suffix.lsp.
To make it always available, follow the instructions that Miles shows here:
Type Appload at the command prompt.
Under the section StartUpSuite, select Contents
Select Add
Browse to the folder where you downloaded the above file.
Pick the file wnum_rmv_iec_suffix.lsp
Select Add and then CloseNow, any time you need the tool to operate on the active drawing, type RMV [Enter] at the command line. You can also run this tool in a project-wide mode. To do this, create a script file with just a single line entry "RMV". Then reference this script file from the "Project-wide Utilities" --> "Run Command Script" edit box.
-
Quick Customize Right-Click Menus - AutoCAD Electrical
April 10, 2009 12:48 PMby Nate HoltUser emails... placement of the "Delete" component command is right next to "Edit" component on the context-sensitive right-click menu. Too often, for this user, the component disappears when user expecting the edit dialog to appear ( ! )
Here's the User's Problem
Right-clicks on a selector switch to do a quick edit. Context menu pops up. User lunges for "Edit Component" but gets the button right above it instead. Selector switch disappears ( ! ).

The Quick Fix
Let's isolate this context menu's "Delete Component" button a bit. Make it is less likely to be selected by mistake.
Launch the CUI command. Just type CUI [Enter] at the AutoCAD Electrical command line prompt. This dialog appears:

Find the "Electrical" category and expand the "Shortcut Menus". Then expand the "Hot Wire menu only - Schematic components" as shown here:

There's our "Delete Component" entry, sandwiched between "Copy" and "Edit". What can we do about this?
Solution #1 - Let's put a bit of extra space above and below it in the menu.
Right click on the "Delete Component" entry and select "Insert Separator". Right click on the "Copy Component" and do the same. This will insert a line separator below and above the "Delete Component" entry.

Now hit OK to dismiss the CUI dialog. Let's try it. Right click on the selector switch now shows the "Delete Component" a bit better separated from the other commands.

We like this. But now that we know we can do stuff like this, we want even more.
Solution #2 - move this command to bottom with even more isolation.
Restart the CUI command. Highlight the "Erase Component" command entry and drag it down to near the bottom of the menu's command list. Add in double sets of "Separators".

Hit OK. Test again. Yes, much better!!!

-
Autodesk Assistance Program
April 6, 2009 10:04 AMby Nate HoltThe Autodesk Assistance Program is being launched in North America for unemployed workers in the architecture, engineering, design and manufacturing communities to update their skills and improve their employability in a down economy.

Autodesk Assistance Program tools and resources will be made available through an online portal where users can access:
1. Free (per terms and conditions of the end-user license agreement that accompanies the software) 13-month term student license of AutoCAD, Autodesk Revit Architecture, Autodesk Inventor Professional, and/or AutoCAD Civil 3D software.
2. Free Online Training - on-demand training through vBooks (internet access required)
3. Reduced-cost Classroom Training
4. Certification - discounted rates through Autodesk AUthorized Certification Centers.
Please access this link for details: www.autodesk.com/pr-assistanceprogram
FAQ: students8.autodesk.com/ama/orig/Autodesk_Assistance_Program_Customer_FAQ-_FINAL.pdf