Controlling the Machine

  • 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

  • Unconventional use of Wire Gaps - AutoCAD Electrical
    February 26, 2008 09:38 AMby Nate Holt

     

    Eight inches of newly fallen snow outside your window and your favorite snow shovel is broken... have to switch to improvise mode.

    Back inside, continue to improvise. Let's say that you want to quickly tie three wires from the right-hand output module into three inputs on the left-hand module, both on the same drawing.

    AutoCAD Electrical can do this with individual source/destination arrow pairs. But, since the source and destination are on the same drawing, maybe we can figure out a way to do it more simply.

    Using / Abusing the Wire Gap feature

    AutoCAD Electrical supports "gaps" in crossing wires. The way this works is that each broken line has an Xdata (Extended entity data) pointer that points at the handle of the other piece. AutoCAD Electrical treats it as a continuous, unbroken line even though it is in two pieces.

    What if we set up the gap and then manually moved each piece to different parts of the drawing? Would AutoCAD Electrical still "think" that the wire was continuous? Answer: YES.

    So, what if I set up three gapped wires, starting at the right-hand module with the other side of each gapped wire continuing back over on the left-hand side of the drawing and tying in to the input module. Would AutoCAD Electrical think that the each wire was continuous? Answer: YES.

    Making it happen with the Check/Repair Gap Pointers command

    This concept should work... and you don't even have to mess around with moving pieces of a gapped wire around. Just use the Check/Repair Gap Pointers command (on the "Spool of Wire" toolbar flyout).

    Pick each pair of start and end wire segments. That's it. The link is established. Wire numbers 710, 712, and 713 connect from the right-hand module and tie in to the three wires on the left-hand module. These connections will now show up in various reports such as Wire From/To.

    Pretty cool.

     

    0 Comment | Add CommentIn Controlling the Machine >

Previous Post

  • Auto-Adjust Drawing Index Report - AutoCAD Electrical
    February 22, 2008 08:32 AMby Nate Holt

    (Note: this posting is a variation on the last posting's theme)

    You plan for future expansion of your control system by leaving unused sheet numbers in your project drawing set. But when you run AutoCAD Electrical's 'Drawing List Report' and then pop it on the drawing as a table, the blank 'future' slots don't show up. You left room for future sheets 3, 7, 10-12... but they don't show up in the index table.

    What you really want to see is this:

    One way around this is to put in dummy placeholder drawings into your project set. But it's a hassle, and you waste paper when you plot the project set.

    A better solution would be to have AutoCAD Electrical's Drawing List Report 'know' when there are unused entries in the sequence and adjust the drawing list report accordingly. You can do this, like the previous posting, by displaying the Drawing List Report and then running a custom 'User Post' utility.

    Setting up the dwglst.lsp 'User Post' utility

    Basically the same sequence as previous posting except that we now set up the program to look at the SHEET number column. When the program detects that there is a sheet number 'gap', it pushes in enough blank lines into the report to fill in the gap. Each blank line is formatted with the next sheet number in the sequence and the label '(future)' in the DWGDESC column.

    Here is the key part of the user post AutoLISP utility:

    How it works

    Data from the report is passed to the user postprocessing utility as a "list of lists". Each of the sub-lists is data for one line of the report. The order of the data elements in each sublist follows this table:

    ; -- Structure of the "wd_rdata" list of lists passed from AutoCAD Electrical:
    ;
    ; (list (list <report line1 data>) (list <report line2 data>) ... )
    ; where each line data sublist consists of a list of the following:
    ; 0 = drawing file name (no path, no extension)
    ; 1 = date stamp
    ; 2 = time stamp
    ; 3 = SHEET assignment (the %S value)
    ; 4 = SHDWGNAME assignment (the %D value)
    ; 5 = SEC assignment (the %A value)
    ; 6 = SUBSEC assignment (the %B value)
    ; 7 = Drawing desc line 1
    ; 8 = Full file name
    ; 9 = Drawing desc line 2
    ; 10 = Drawing desc line 3
    ; 11 = IEC-Project (the %P value)
    ; 12 = IEC-Installation (the %I value)
    ; 13 = IEC-Location (the %L value)
    ; 14-x = other values defined in ".wdt" title block attribute mapping file

    So, we want to the program to monitor the SHEET number (index #3 in each sublist) and insert a blank line into the report whenever the program detects a sheet value 'gap' as it goes from one line to the next in the report data.

    The program first grabs the data's beginning sheet number text value and converts it to an integer number.

              ; Get first line's SHEET value (integer value)
              (setq sheet (atoi (nth 3 (car wd_rdata))))

    Next it begins to loop through each line of the report data. It looks for a 'change' in the sheet number that is greater than one.

              (foreach xx wd_rdata
                (setq nextsheet (atoi (nth 3 xx)))
                (if (AND (> sheet 0)
                         (> nextsheet 0)
                         (> nextsheet sheet)
                         (> (- nextsheet sheet) 1))
                  (progn ; one or more skipped sheet numbers.
                         ; Add in blank entries as place holders.

    If a gap greater than 1 is found, then it goes into a 'repeat' loop and outputs a number of new blank lines into the report data equal to the size of the sheet number gap. Just before each blank line is inserted, the utility pops in the next sheet number sequential and pastes in the word (future):

                    (repeat (1- (- nextsheet sheet))
                      (setq sheet (1+ sheet)) ; increment sheet number
                      ; Insert into blank line
                      (setq blank (wd_nth_subst 3 (itoa sheet) blank))
                      ; Insert word "(future)" into the DWGDESC column
                      (setq blank (wd_nth_subst 7 "(future)" blank))
                      ; Push blank line into the output list
                      (setq rtrn (cons blank rtrn))
                    )

    That's about it.

    Set up

    Here's the dwglst.lsp file  files/20901_21000/20908/file_20908.lsp (rename to dwglst.lsp and push into your c:\program files\autodesk\acade 2008\support\" folder, overwrite existing version)

    And here's the associated dialog DCL file  files/20901_21000/20909/file_20909.dcl (rename to dwglst.dcl and push into the above folder, overwrite existing)

    0 Comment | Add CommentIn Controlling the Machine >

  • Drawing List report and 'user post' example - AutoCAD Electrical
    February 19, 2008 09:23 AMby Nate Holt

    Nearly all of AutoCAD Electrical's reports can be reformatted on-the-fly with a custom 'user post'. It requires some setup but can fill in the gap between what ACE supplies out-of-the-box and what your specific needs might be.

    Here is a recent example. A user wanted to run the 'Drawing List' report but then insert a blank spacer line into the report whenever a specific field value changed from one line to the next. In the report display below, every time the "Section" value changes, we'd like a blank spacer line inserted into the report. So, a blank line to show up with each change in the "Contract x" number.

    The key to making this work is to tie in to the 'User Post' function. The button is in the the lower right-hand corner of the display dialog:

    This will search for and launch an AutoLISP utility that matches up with the report type being displayed. Hit the button and then look at your command window. The path to the AutoLISP utility should be there:

    Now the hard(er) part

    You need to open up the dwglst.lsp file with an ASCII text editor or the built-in Visual Lisp editor (make a back-up copy first!).

    Right now, the file is just a blank template. It has three user options but none of them are set up to do anything. Here is the key part of the post-processing utility program. It is just a place-holder for where we will start to add our own custom code:

    The report data comes across in variable "wd_rdata". The format of this data for this "Drawing List" report is this:

    ; -- Structure of the "wd_rdata" list of lists passed from AutoCAD Electrical:
    ;
    ; (list (list <report line1 data>) (list <report line2 data>) ... )
    ; where each line data sublist consists of a list of the following:
    ; 0 = drawing file name (no path, no extension)
    ; 1 = date stamp
    ; 2 = time stamp
    ; 3 = SHEET assignment (the %S value)
    ; 4 = SHDWGNAME assignment (the %D value)
    ; 5 = SEC assignment (the %A value)
    ; 6 = SUBSEC assignment (the %B value)
    ; 7 = Drawing desc line 1
    ; 8 = Full file name
    ; 9 = Drawing desc line 2
    ; 10 = Drawing desc line 3
    ; 11 = IEC-Project (the %P value)
    ; 12 = IEC-Installation (the %I value)
    ; 13 = IEC-Location (the %L value)
    ; 14-?? = other values defined in ".wdt" title block attribute mapping file

    Since we're interested in tracking the value of the "Section" value from one drawing to the next, we need to focus in on the index 5 position of each line of data.

    So, coding this up, we might end up with this new code inserted into the above place-holder:

    Our code grabs the "Sec" value from the first line of report data. Then it cycles through all lines of the report. Whenever the "Sec" value changes, it pushes in a "blank" line into the report.

    Here's our new report display after selecting the "User post" button and picking the first option on the user post subdialog:

     

    Here's a copy of this sample user post utility and the companion "dcl" dialog file.

    files/20801_20900/20884/file_20884.lsp (rename to dwglst.lsp)

    files/20801_20900/20885/file_20885.dcl (rename to dwglst.dcl)

     

     

    1 Comment | Add CommentIn Controlling the Machine >

  • Chinese New Year's good luck falls a bit short for US-based Autodesker
    February 7, 2008 07:54 AMby Nate Holt

    (Singapore, 07-Feb-2008): New-year’s day good fortune appeared to take a momentary lunch break as Autodesk’s Nate Holt and three companions were strolling down the pleasant, nearly deserted Orchard Road boulevard in Singapore in search of an open restaurant. “I just heard a whoosh”, said Autodesk’s Novi Michigan-based Jared Bunch, “and caught a glimpse of a shadow falling from the sky”. Both Lake Oswego-based Jose Santos and Novi’s Mike Spitzer were able to jump out of the way. Not so Toledo-based Nate Holt, AutoCAD Electrical Architect. The business end of a large palm branch grazed his head and neck and struck him on the shoulder. Twisted/broken glasses went flying.  

    Fortunately, due to the quick thinking of Jose and Mike, a photographic record of the incident was preserved (though somewhat dramatized). As there was no permanent injury, the quartet repaired to a nearby restaurant to celebrate “Mr. Lucky’s” Chinese New Year good fortune.

     

    1 Comment | Add CommentIn Controlling the Machine >

  • Quiz #1 - AutoCAD Electrical
    February 6, 2008 07:07 AMby Nate Holt

    Are you AutoCAD Electrical proficient? Try this quiz. It might be fun. This evolved from an impromptu training session that I was involved in a couple days ago. Our first session dealt with library symbol basics and the twenty questions cover some aspects of what we talked about.

    When finished, you can turn it in (email to nate.holt@autodesk.com) and we'll grade and maybe post results a bit later.

     

    Q1.  True/False – AutoCAD Electrical uses AutoCAD “custom objects” for schematic components, wire numbers, and physical panel layout representations. _________

    Q2. What is the absolute minimum needed for a generic AutoCAD block insert to be recognized as a “parent” schematic component symbol? ___________________________________
    Q3. True/False – AutoCAD Electrical requires that schematic component symbols always be constructed with pre-defined widths so that wires can “know” where and how to connect. ____________
    Q4. What two attribute names on a component symbol are used to carry and report catalog part number and manufacturer assignments? ________ and _________
    Q5.  Does this push-button component symbol show a “Normally open” or “Normally closed” electrical contact? ________________________
    Q6.  If there was 240 volts of electrical potential on one side of the push-button contact and you accidentally grabbed a bare wire on the other side of that push-button contact, would you prefer the push-button’s contact type to be “Normally open” or “Normally closed”? ________________________
    Q7. What is the most likely block name for the symbol shown in Q5? _________________
    Q8. What is the most likely attribute name for the left-hand wire connection on the Q5 symbol? _________.
    Q9. If the Q5 symbol carries attributes for both a terminal “pin” number and pin number description text, what would the most likely attribute names be for the right-hand side wire connection attributes? Wire connection attribute name: ___________, Pin attribute name: _____________, Pin description attribute name ______________.
    Q10.  What is the most likely block name for this parent push-button symbol shown at the left, inserted into a wire? ___________

    Q11. If AutoCAD electrical could not find the symbol shown in Q10, what symbol name would it try to find and insert? ______________. If found, what are two things would AutoCAD Electrical do to the symbol as it inserts? 

    A. ____________________________________

    B. ____________________________________

    Q12. Each circle on this “transformer” component symbol needs to allow a wire to automatically connect from either of two different directions. The upper left-hand circle has two red wires shown. If the “H1” terminal pin is attribute “TERM01” and both wire connections on this circle need to relate to this single terminal pin attribute, what two wire connection attribute names must be used on the edge of this circle? 

    Upper edge: __________________

    Left-hand edge ______________________.

     Q13. A parent selector switch is shown above left. It is tied to a child contact through a dash link line. A. What are the first five characters of the parent selector switch’s block name? ____________. B. How about the first five characters of the child selector switch contact’s block name? ____________.
    Q14. What attribute name does the upper end of the dash link line “connect” to on the parent selector switch symbol? _______________.
    Q15. What attribute name does the lower-right hand end of the dash link line connect to on the child contact symbol? _________________.
    Q16. Two terminal symbols are shown inserted into a wire and wire numbers applied. The third character of the round terminal symbol’s block name has to be what?   ___
    Q17. A co-worker says that two wire connections on his 8-connection custom schematic symbol act strangely. Whatever wire number connects to one of the connections is repeated on the other connection. All the other six wire connections work fine. What is probably wrong? ____________________________________________________________________
    Q18. Another reports that his custom schematic symbol will not break wire numbers on any of its connections. What single question do you ask the customer to have him view you as a total genius?  “Is the _________________ character of your symbol’s block name a ____?
    Q19. You created a special pair of normally open and normally closed contact symbols. They work fine with AutoCAD Electrical in every way except for the “Toggle NO/NC” command. With this command, there is no response. What is likely wrong? ______________________.
    Q20. A client created a special, vertical version of a pushbutton symbol shown here. Everything works fine except that whenever he tries to wire up the bottom wire connection, the wire won’t connect as expected. It ends up horizontal as shown. What is wrong? ___________________________

    2 Comments | Add CommentIn Controlling the Machine >

  • Simple Conduit Fill Calculations / Reports
    February 3, 2008 06:50 PMby Nate Holt

    The product has some basic tools (been in there for a long time) that might help you group wire conductors into a conduit or wire-way run and then size it appropriately. A reporting tool lets you generate a simple project-wide conduit report.
    For example, let’s say the schematic shows a 50Hp motor, “MOT211” tied back to terminals in motor control center “MCC01A” through a safety switch “DS211A”. Elsewhere in the schematic is an aux contact from this safety switch tied in to the control circuit. The three phase wiring is drawn on layer “BLK_6_XHHW” which probably means black wire conductors, size 6AWG, insulation type “XHHW”.
     
     

    How can AutoCAD Electrical help us calculate the appropriate conduit or wire-way size and ultimately give us a basic conduit/wiring report?

    Setup

    There is some initial setup required. This involves editing a couple ASCII text files – one to map each wire layer name on your drawings to a conductor diameter value. The other support file lists trade-size conduit and wire-way maximum fill cross-section values based upon your local electrical code.
    1. Wire diameter mapping file
    This is an ASCII text file, default name is default.wdw and an initial copy of this might be found in your AutoCAD Electrical "user" folder. Here is a modified version of this file set up for our example drawing set:
     

     Each line of data is delimited into a maximum of three pieces (semi-colon delimited). The first gives the wire layer name, the second gives a text string that can be substituted for the layer name in various wire reports and for the color/gauge label command. The third entry gives the wire’s actual diameter value.

    This file is used in other places in AutoCAD Electrical, but for conduit/wire-way sizing, the first and third data elements are what we are focusing on. You may already have a file like this on your system (in the "user" folder) but it may be lacking the third entry in each line. You’ll need to add in this conductor diameter data to enable AutoCAD Electrical to do any fill calculations. (Note: like many of the customizable support files in AutoCAD Electrical, this file can be made "project-specific" by copying it to a name "<project name>.wdw")
    So, in the motor example above, we have three conductors on layer BLK_6_XHHW. From the above table, AutoCAD Electrical now knows that each conductor’s diameter is 0.274 (pulled from manufacturer data or perhaps from an NEC Electrical Code table).
    2. Conduit / Wire-way Size Table

    This second file’s default name is default.ww1 and is shown here (may be on your system under folder c:\program files\autodesk\acade 200x\support\) .

    Each line is broken into two parts by a semi-colon delimiter. The first part gives the conduit or wire-way size and the second piece gives the maximum allowable cross-section fill. So, in the example file above, a ¾ inch conduit is 100% full when the sum of the conductor cross-sections reaches a value of 0.21.

    Running the Conduit tagging/sizing utility

    First of all, we need to turn on the “Conduit tagging” toolbar. It is not “on” by default. Go to the Project pull-down, select “Toolbars”, and select the conduit option.

    A small, 5-button toolbar should show up somewhere on your screen.

    Okay, we’re ready to go.

    Let’s create a new drawing and add it to our project. This will be our conduit / interconnection diagram. Select the “Insert Footprint (Schematic List)” command on the first pull-down of the panel toolbar. Insert generic representations of the motor and the motor’s disconnect switch.
    Now draw a line or polyline between them to represent the conduit (or wire-way).

    Next, select the right-hand button on the conduit toolbar. This will make sure that the project’s scratch database is up-to-date with schematic wire connection data. Now pick the left-hand button on the conduit toolbar. Pick on the line that represents the conduit and one more pick to identify where the little conduit marker tag is to be. Before you exit the command, it prompts to you select the device or devices that this conduit is going to run to. Pick on the motor symbol.

     

    The Big Dialog

    This Conduit Label dialog now pops open.

    Two key things initially show up. First, in the bottom right hand part of the dialog is a list of all schematic wires that AutoCAD Electrical found going to motor MOT211.

    And in the middle left-hand column is a listing off all the conduit entries you’ve set up in default.ww1 with the fill calculated for the sum of all of the listed wiring.

    It looks like a ¾” conduit is large enough to handle the three # wires. But wait, let’s say we always run a green ground wire with all motor wiring. We may not show it on our schematics but it is in our installation specification for the contractor. Back at the dialog, select the “Spares” button and add in a #8 Green XHHW (highlight in the left-hand list and hit the “Add->” button to move a copy to the right-hand list).

     

    Select OK. Note that the conduit fill window updated to take into account the extra added wire, and now a ¾” conduit is not quite large enough. Need to specify 1”. So, highlight the 1” entry and hit OK.

    And here is our first conduit tag label. The wire information is stored right on the tag as invisible data.

    Now let’s draw in a home run from this DS211A disconnect plus add in a second motor from our schematic. Here’s what we might lay out before attaching tags and sizing the conduits.

     

     Now let’s do the run starting at the lower disconnect switch heading back to MCC. Pick the Insert/Edit Conduit Tag command again (left-most toolbar button) and pick on the line. Then pick on the DS211A representation. The big dialog displays all wires that tie into this disconnect switch. This includes two wires from a auxiliary contact in the control circuit and the three wires we already have going to the motor. Subtract out the direct to motor wires by doing a CTRL-select and hitting “Remove^”.

     

     Add in the spare ground wire and look at the conduit fill values. Looks like 1” should be large enough for this segment.

     

    Continuing on with the second motor...

    And now, the final home run from the bottom tee-intersection back to MCC01A. This conduit segment will need all wires that show up in “C2” and in “C5”. So run the conduit tag insert and pick right on these two existing tags ( ! ). That’s it.

     Conduit Report

    To finish off, pick the 4th toolbar button and run a report. You may not get it to format exactly the way you’d like, but all the data is there. You can save it to an Excel spreadsheet and massage it as needed and then pop it back into your drawing as a table.

    That's about it. Again, a simple set of tools. Take a look. Let us know where you'd like to see changes. For example, we''ve already received suggestions about flipping it to a "cable-centric" mode instead of its existing "conductor-centric" mode. And the wire assignments you make to the conduit tags are not currently set up to real-time update if the schematics change (arguments might be made both sides of that one). Anyway, let us know. Thanks! - Nate.

     

    4 Comments | Add CommentIn Controlling the Machine >

Subscribe to Blog

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

RSS

Categories

All

Blog Roll

AUTODESK MANUFACTURING COMMUNITY

Ellipsis
The official Autodesk Manufacturing Tech Evangelist blog
Under The Hood
Brian Schanen on Vault, Productstream, and more
In the Machine
Garin Gardiner hosts the official blog of the Inventor Product Team
Controlling the Machine
Archive of Nate Holt's AutoCAD Electrical posts

RECOMMENDED

Being Inventive
The official support blog for the Autodesk Inventor product line
Between the Lines
Shaan Hurley's AutoCAD Blog
It's Alive in the Lab
Scott Shepherd's Lab's Blog
Beyond the Paper
Volker Joseph's DWF Blog
Lynn Allen's Blog
Staying current with AutoCAD and Autodesk

PEER

AutoCAD Electrical Etcetera
Nate Holt shares AutoCAD Electrical tips and tricks.
Autodesk Manufacturing Northern European
The official blog for the Autodesk Northern Europe Manufacturing Technical Team.
Sean Dotson's Site
Sean Dotson's mCAD Tutorials, Forums, Admins & more
The Autodesk Informer
Helpful sites, tutorials, and industry news
CAD Professor
Inventor, Inventor LT, and AutoCAD news and updates.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback