Nate Holt's Blog

July 27, 2009

Overview of AutoCAD Electrical’s WDATA table – intermediate wire network data table

Filed under: Electrical, Tutorials — nateholt @ 4:48 pm

Lines and blocks/attributes are used to construct “smart” schematic diagrams in AutoCAD Electrical. This raw information automatically finds its way into the WDATA table in the active project’s scratch database file. Further processing and formatting (i.e. time consuming) eventually pushes this data into the finished WFRM2ALL and WNETLST tables. But, with care, this intermediate WDATA table data can be parsed to obtain complete wire network data without the overhead of the additional processing. The format of the WDATA table’s data is briefly outlined here with examples. It may provide benefit in creating custom AutoCAD Electrical applications that have a need for speed.

WDATA table in the overall scheme of things

The project’s wire connection information is pulled into various tables in the project scratch database, processed, and then presented in several forms as separate tables in the project scratch database.

Wire network processing takes place with the scratch database serving as temp storage for raw wire and component connection data (includes WIREFRM2, WIRESEG, WIRENET tables). This is processed into an intermediate wire network result (the WDATA table). Finally, a full from/to version of the data is formatted in a separate operation (table WFRM2ALL and an alternate format WNETLST tables).

 The first two levels of processing (pulling in the raw wire and component connection data and then creating the intermediate wire network results) are done automatically by the “running in the background” project database service (i.e. “PDS”). When a drawing in a project is changed, even without QSAVING the drawing, PDS will eventually recalculate all wire networks and update through to the WDATA table.

 The “final”, full form of the wire from/to data in tables WFRM2ALL and WNETLST is derived from this WDATA table’s data. These two new tables only update if user does a full rebuild with wire connection option checked or invokes some ACADE command that requires full from/to wire data (ex: panel footprint annotation with schematic wire connection data or a project-wide wire from/to report).

 This WFRM2ALL/WNETLST table update can be a bit time consuming whereas the data in WDATA is always being updated, behind the scenes, by PDS. With care, complete or nearly comple wire network information can be derived directly from this WDATA table.

WDATA table format

The WDATA table’s data is in a format that is a bit confusing. Some examples will illustrate how to decode it.

 Example 1 – simple, single wire connection between two components, all on same drawing, no source/destination arrows involved, no gap/loop involved.


The handle numbers for the entities are hand-drawn in RED.

The entry in the project scratch database file’s WDATA table for this wire network, is reproduced below:




Example 2 – more complex network with two source arrows going to three split-off continuation pieces of the network.


The handle numbers for the entities are hand-drawn in RED and the source/destination arrow SIGCODE values are shown in BLUE.

The entry in the project scratch database file’s WDATA table for this wire network, a bit more complex, is reproduced below. Since there are four distinct pieces of the network tied together with source/destination arrows, there are four records in the database for this overall network.

One record shows two “Source arrow” SIGCODE values. There are three other records in the WDATA table that have matching “Destination arrow” SIGCODE values. This means that these three records tie into the first record, forming one big wire network.

The breakdown of each of these four records for wire number “1” is the same as described in the first example.


So, to build up this split-up network stored in four separate records, here is what needs to happen. 

Program processes all networks that have neither Source nor Destination codes. What is left will be networks that are split.

Begin with first split network record. Gather up list of Source/Destination codes. Scan all remaining records for others that reference either one of these Source or Destination codes. For each found, add to the list of records that are to be combined into one big network. If other Source/Destination codes are found in these added records, add to the running list and make a second pass to collect any additional network pieces. When no more to add to the list, process the multi-piece list as one big network ( ! )



  1. Hi Nate,

    Thank you for your tutorial, it is very helpful!. We just install Autocad Electrical 2015 2 weeks ago. I just find out that the auto wire number feature is not so suitable for our application.

    Is it possible to read the list from the drawing, modify the wire number in the list to change the wire number attribute value and save the changes for report?

    Thanks in advance.

    Comment by Yaw Chen Ah — April 6, 2015 @ 4:13 am

    • Hello Yaw Chen Ah,
      You should be able to Export your project’s current wire number assignments “To” an Excel spreadsheet (select the “Import/Export Data” tab in AutoCAD Electrical, pick on “To Spreadsheet”). Edit the spreadsheet’s wire number assignments, and then import the new wire number assignments “From” the spreadsheet (select the “Import/Export Data” tab in AutoCAD Electrical, pick on “From Spreadsheet”).

      Please let me know if this does not work or does not meet your needs.

      Comment by nateholt — April 6, 2015 @ 9:04 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Blog at

%d bloggers like this: