Terminal Plan report - controlling the "field" wiring side in AutoCAD Electrical

  • Oh no! An error has occurred!
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • 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.

    About Nate

Latest Post

  • Terminal Plan report - controlling the "field" wiring side in AutoCAD Electrical
    March 14, 2007, 08:57 PM Nate Holt

    This question came up in the last 24 hours. A user wanted quicker set-up / control over terminal "field" side reporting. AutoCAD Electrical provides a means to mark individual terminal wire connections as "internal" or "external" connection. Then, when a terminal plan report is displayed, there is an option to flip the report to show external-marked connections on one side of the report or the other (toggle and radio button selection shown below).

    ext04.jpg


    Marking Internal / External Connections
    The user wanted to have this "external" marking controlled by wire layer name. Great idea! If he connected a "field" wire to a terminal, he wanted that wire connection on the terminal to be automatically marked as "external". This would save time in setting up the schematics to give the desired report output.

    In the small sample below, the field wiring is its own wire layer, shown red and dashed. It ties the four pilot lights (assumed to be field mounted) to the three terminals, terminal strip "X" terminals 11 through 13.

    ext01.jpg


    Without any internal/external marking of the terminal connections, the terminal plan report pretty much comes in randomly. It might look like this:

    ext02.jpg


    But we'd like to have all of the pilot lights, tied with the red "field" wiring, to be shown on the right-hand side of the report. In other words, the red-marked entry in the report above needs to be flipped.

    The existing tool to do this is on the "Spool of Wire" toolbar fly-out, all the way to the bottom. There is this sub-fly-out with the "Mark insert/external" tools:

    ext06.jpg


    So, how to do this the new, easy way?

    But we want to control this by the connected wire's layer. It will be much cooler. So, we throw together a little AutoLISP utility and reference a handful of the AutoCAD Electrical API calls to make this thing pretty easy to do. We find the terminals, look at the connected wires, determine wire layer, and mark the terminal wire connection accordingly.

    AutoLISP utility to do the job

    Here's a breakdown of the program:

    Part 1
    extp1.jpg

    Here at the beginning, the utility has a line that defines what layer or layers are going to be processed as "field" wiring. Here we've "wildcarded" any layer that contains the substring "FIELD" or "CUSTOMER". So, wire layer RED-FIELD-14AWG would be a valid "field" layer that we'll act upon.

    We also prompt the user to select what terminals to process. This is done with the "ssget" call. But we restricted the selection set operation to only accept block inserts and block inserts with names that match the AutoCAD Electrical naming convention for terminal symbols. This speeds things up just a bit.





    Part 2
    extp2.jpg

    The next part of the utility, shown above, is where we start to cycle through the terminals in the selection set, one at a time. For each terminal entity name we first get the terminal name and number (attributes TAGSTRIP and TERM01 or WIRENO). Then we make an AutoCAD Electrical API call to get all wires that connect to each wire connection attribute on the terminal symbol being processed. This is the "wd_get_sym_pntlst" call. It returns a list of wire connection data lists. Each wire connection data list includes a sublist of connected wire entity names.

    We cycle through this list of connected wire entity names (in variable "wirelst") and check each one's layer name for a wild-card match on the "field" layer names. On a match we set "hit" to "true".





    Part 3
    extp3.jpg

    Now, above, if we found a match on the "field" wire layer, we go ahead and prepare to mark the wire connection point's X?TERMxx attribute with an "E" for "external" (if it's not already marked with an "E").




    Part 4
    extp4.jpg

    ... and here we actually write out the new attribute value (if required) and we format a message to output to the command window.





    Part 5 - exiting
    extp5.jpg
    ... and loop back around until finished with all selected terminals, nil out the selection set variable, and exit the program. That's it.





    Let's try it

    APPLOAD the utility (download a full copy here), and type this at the command line: MARKTERM_EXTERNAL [Enter] as shown below. Window the terminals and in a moment, we're done.

    ext03.jpg


    Let's test our results

    We re-run the Terminal Plan report, flip the "E" side to the right, and here it is:
    ext05.jpg

    Note: one blank line is in there. Not sure where this came from. Will have to investigate... but the idea seems to work!

    1 Comment | Add Comment Controlling the Machine > All

Comments

  • May 9, 2007 06:44 AM Pete Brown

    Very useful utility, tried it and it works brilliantly (we use the layer name MC* for all external or field wiring/Multicore cabling. The question now is can this be translated onto Panel Wiring diagrams. Pete B



You must be logged in to post a comment.

Subscribe to Blog

Want to keep up with the latest? Subscribe to the RSS feed today.

RSS

Tags

You must be logged in to add a tag.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback