-
Flagging source/destination wiretype mismatches - AutoCAD Electrical
December 21, 2008, 10:22 PM Nate HoltIt seems to not be that hard to end up with some mismatches between wire types jumpting from one drawing to another. Here's a little tool that may help highlight these mismatches.
The utility is written in AutoLISP and makes a handful of calls into the AutoCAD Electrical API. It operates wholly on the current project's "scratch database" file. It first queries the database's SIGS table and pulls in a list of all of the source / destination signal arrows currently found in the project. This data includes the arrow symbol handle, drawing index code, and the assigned SIGCODE attribute value (used to match up source to destinations). Then it scans the WDATA table. This table carries the current state of all of the project's wire connections.
Each wire connection record includes the connected component's handle, drawing index, and the layer of the connected wire. So all the utility needs to do is use the first list of data, the SIG table data, as a filter against all of the wire connections in the project. It finds and groups all wire connections that have a common SIGCODE attribute value. Within each group, If there are two or more wiretype layers represented for the common SIGCODE value, it flags this as a "wire type mismatch" condition.
Here is sample output: For example, it shows that Source signal "M413 AUX N.O." is linked to wire type layer "RED_14AWG". But the Destination end where this wire jumps to is marked as being wire type layer "RED_18AWG".

If you'd like to give this a try, please download the utility here:
files/23201_23300/23261/file_23261.lsp - rename to audit_sig_layers.lsp
To use:
1. Select your project to be the "active" project
2. APPLOAD attached AutoLISP file
3. Type audit_sig_layers [Enter] at the "Command:" prompt
That should do it. The utility should output a list of any mismatches found. This list appears in the command window and it also written out to a text file.
Please feel free to adjust this utility. It is straight AutoLISP. Should be fun to do!
Comments
-
January 8, 2009 07:15 AM Pascal van der Neut
I have made step 1 to 3 but nothings seems to happen. what is going wrong? The text of the command line was: audit_sig_layers.lsp successfully loaded. audit_sig_layers.lsp successfully loaded. audit_sig_layers.lsp was added to the Startup Suite. Command: Command: Command: Command: Command: Command: Command: Command: AUDIT_SIG_LAYERS Report: c:/sig_audit.rep Command: Command: AUDIT_SIG_LAYERS Report: c:/sig_audit.rep
-
February 18, 2009 10:34 AM Nate Holt
It may have worked. It just creates a report file c:\sig_audit.rep and then exits. You have to open up this text file with some other application like Word or Wordpad or any text editor. Let me know if this does not appear to be the problem at your end. You can email me directly at nate.holt@autodesk.com. Otherwise I may not see your response for some time...
You must be logged in to post a comment.