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

  • Concatenations in Title Block Update - AutoCAD Electrical
    May 2, 2008 08:31 AMby Nate Holt

    Going beyond simple one-for-one text value insertions into a title block... this customer issue came up a couple days ago. AutoCAD Electrical's project-wide title-block update tool defaults to simple mapping of discrete drawing or project setting values to individual attributes in the title block. But this customer needed to format several of these drawing-specific values into one concatenated text string value and push it out to a single attribute on each drawing's title block.

    Let's say that the user's title block carries attribute "TB-DNAM" that is to carry a value that is a combination of the following project and drawing-specific values: Project "LINE3" value, then a dash character, then the project's "LINE14" value, then a colon, and finally the drawing's SHEET number assignment.

    Normally, this would have to be all done by hand. But with a little customization, we can trigger AutoCAD Electrical's title block update command to do this attribute value format automatically. Let's write a little AutoLISP function that we'll call "tb_concatenate.lsp", and it will concatenate values and return a single text string.

    And then, in our title block update ".wdt" file (or on the title block's invisible WD_TB attribute), we'll include the "TB-DNAM" attribute annotation to reference this AutoLISP function like this:

    TB-DNAM = (tb_concatenate (list 3 "-" 14 ":" "SHEET"))

    The key is that our function will accept a list of parameters to concatenate. So, it is "general purpose" !

    Here is the tb_concatenate utility and a brief summary of how it works.

    Above and toward the end, the function first reads in data from the active project's ".wdp" file. This will carry two lists of data that may be needed. First, there is the list of all project "description" lines, the LINE1 through LINEx values defined for the overall project. And second, there is a list of drawing-specific Section, Subsection, and drawing description lines. Each entry in this list is for a drawing in the project. Each entry is a "sublist" containing a list of the drawing's values.

    Now, below, the function begins to process the list of parameters passed in the call. The parameters are in "linelst" and processed one at a time, the "foreach" call. Each is checked to see if it is an integer number or a text string. If integer number, then it looks into the project description list pulled in above. If not integer, then it compares the passed text string parameter against a set of specific flags like "SHEET", "IEC_L", and "DD2".

    If no match as integer numer or on any of the specific text flags, it finally (near the bottom below) assumes that the parameter is just a text string to insert directly into the output.

    And that's it. When finished processing all of the passed parameters, the full concatenated string is returned by this AutoLISP expression. The AutoCAD Electrical Title Block update command pushes this concatenated value out to the target attribute on the title block ( ! ).

    Download utility here:

    files/21401_21500/21413/file_21413.lsp - download and rename tb_concatenate.lsp

    To use, you MUST first APPLOAD this utility before launching the title block update command. If you are running in multi-document mode (the AutoCAD default), then you'll need to use a method to make sure this utility loads with each drawing as it opens. Otherwise it will work on the first drawing and then fail from that point forward.

     

     

    0 Comment | Add CommentIn Controlling the Machine >

Previous Post

  • Match Wire Number Text to Wire Color - AutoCAD Electrical
    April 22, 2008 09:03 AMby Nate Holt

    Here is a simple user request that finds a happy solution using the AutoCAD Electrical "API". A small AutoLISP utility with a few embedded AutoCAD Electrical API calls does the trick.

    The Request

    Out-of-the-box, AutoCAD Electrical pushes all wire number text out to the user-defined layer under "Drawing Properties". In the example drawing below, the wire numbers all appear yellow because the defined WIRENO layer itself has been set to default to yellow.

    But the user prefers to see the wire number take on the color of the wire it is tied to. So wire numbers 59, 60, and 61 display as gray, 64 and 65 red, and the rest white.

    So, how to do this? All that is needed is a little post-processing utility to find wire number attributes, find the layer of the wire that the wire number ties to, and flip the attribute's layer to match that wire layer.

    The AutoLISP Utility

    Here is one way to do it. This AutoLISP utility includes a half-dozen calls into the AutoCAD Electrical API.

    Download file from this link, rename to wn_textcolor.lsp

    files/21301_21400/21353/file_21353.lsp

    To Use

    Download the utility and rename it to wn_textcolor.lsp. APPLOAD it. Then type WD_TEXTCOLOR [Enter] at the command line.

    Result

    Here's the "after" version:

    The utility should also find and move the "extra wire number copies" and any wire number leaders.

    1 Comment | Add CommentIn Controlling the Machine >

  • Autodesk University 2008 - LAST Call for Papers
    April 21, 2008 07:54 AMby Nate Holt

    Please submit your AutoCAD Electrical presentation proposal(s) online, as soon as possible (deadline April 27, 2008), at the "Call for papers" website:   http://au.autodesk.com/event/speaker_cfp/
    So, if you:
     
    • Have the communication skills, technical expertise, and relevant experience using AutoCAD Electrical….
     
    • Want to share your knowledge of a favorite topic—from tips and tricks, customization, new-user tutorial, or maybe even a look at a topic such as AutoCAD Electrical and sustainable design….
     
    • Are motivated to bring success to your peers….
     
     
    … Then Autodesk wants to hear from you—now!
     
    A speaker honorarium is also provided.

    0 Comment | Add CommentIn Controlling the Machine >

  • Autodesk University 2008 - Call for Papers
    April 21, 2008 07:49 AMby Nate Holt

    Please submit your AutoCAD Electrical presentation proposal(s) online, as soon as possible (deadline April 27, 2008), at the http://au.autodesk.com/event/speaker_cfp/guidelines/types/
     
    So, if you:
     
    • Have the communication skills, technical expertise, and relevant experience using AutoCAD Electrical….
     
    • Want to share your knowledge of a favorite topic—from tips and tricks, customization, new-user tutorial, or maybe even a look at a topic such as AutoCAD Electrical and sustainable design….
     
    • Are motivated to bring success to your peers….
     
     
    … Then Autodesk wants to hear from you—now!
     
    A speaker honorarium is also provided.

    0 Comment | Add CommentIn Controlling the Machine >

  • Help Wanted
    April 9, 2008 11:13 PMby Nate Holt

    The AutoCAD Electrical team is looking for customers who would be interested in helping to shape future releases of AutoCAD Electrical by attending periodic webcasts. The primary objective of these meetings would be for you to work directly with the AutoCAD Electrical team to gather your requirements, input, and suggestions regarding potential product enhancements. Prior to the events, you would receive an invitation with the details of the meeting as well as a high level agenda of the topics that will be discussed during the meeting. Participation is completely voluntary, but in order to participate in these discussions, you will be required to first sign our Non-Disclosure Agreement (NDA).

    If you are interested in participating in some of these meetings, please first complete the survey which you can access by clicking the link below:


    http://www.surveymonkey.com/s.aspx?sm=eoH3_2bL9p5DwWs0RuVVm93w_3d_3d


    Here are some answers to questions you may be asking yourselves right now:

    Q.) Where are these events held? Do I have to travel for them?
    A.) These events are held via a webcast presentation and conference call, so there is no need to travel and all you would need is internet access and a telephone.

    Q.) What is required of me if I attend one of these events?
    A.) Nothing, other than sending the requested information, signing and sending back the NDA, and calling/logging into the presentation. These events are completely voluntary and if you are not interested in a particular topic, or are just too busy at the time of the meeting, that is fine, you don’t have to attend. You can just wait for the next topic and discussion to take place and attend that meeting if you are available. Please keep in mind that our purpose of hosting these discussions is to help us ensure that we are meeting your needs with the potential product enhancements that are discussed.

    Q.) Ok, so I don't have to attend every discussion that I receive an invitation for, but for those that I do, how much of my time will it take?
    A.) We completely understand and respect how busy everyone is. Our goal for these events is to keep them to a 1 hour timeframe. Sometimes, the discussions may run over a little when many people have feedback they would like to provide, but we fully understand that not everyone may be able to continue to participate past an hour. We want everyone who joins the discussions to feel free to voice their opinions and to provide their input during these discussions. Having an open environment for these discussions where everyone feels comfortable contributing can really help to drive deeper discussion and discoveries and overall lead to a better solution for the potential product enhancements.

    The AutoCAD Electrical team looks forward to hearing from you and to your participation in these events!

    Jared Bunch
    Product Designer
    Autodesk, Inc.

    7 Comments | Add CommentIn Controlling the Machine >

  • "User Post" to alter sort of "By Tag" BOM
    April 7, 2008 03:06 PMby Nate Holt

    This came up late last week. A European user was seeing his "By Tag" bill of materials report show up sorted in reverse order when the primary sort was set to be the "TAG" field. He was seeing BOM entry for "-91K" show up before the entry for "-51Q" or "-1X".

    It appears that this report is first attempting to sort on the numeric suffix value of the field before it tries an alphanumeric evaluation. So the leading "dash" character common in IEC tagging mode was making the tag values look like negative numbers. The result is that sorting negative numbers from small (most negative) to large (least negative) would put "-91" before "-15" and "-1".

    The work-around was to create a "User Post", launched from the "By Tag" BOM report display. This would "post-process" the report data, do an alphanumeric sort (instead of numeric sort) on the "Tag" field, and then re-display the report.

    It only took one line of code added to the existing "user post" AutoLISP utility that ships with the product. This extra line makes a call into an AutoCAD Electrical API "sort" function. It sorts on the "(nth 16 ...)" element of each "By Tag" BOM entry - which corresponds to the "TAG" field. 

          (if (= user_2 "1")
            (progn
              (setq combined_data (c:wd_selsort combined_data '(lambda (X Y) (< (nth 16 X)(nth 16 Y)))))
          ) )

    The ACE2008 path/filename is c:\program files\autodesk\acade 2008\tag_bom.lsp - for other versions, hit the "User post" button with the report displayed and observe the full path/filename given in the command window).

    To finish it off, the "Dialog" entry can be changed as well (same folder, file name tag_bom.dcl):

     :toggle{key="user2";
            label="Use alpha-sort on TAG column";
            }

    That's it. Seems to work.

    Download files here is you'd like this adjusted user post file.

    files/21201_21300/21282/file_21282.lsp   (rename tag_bom.lsp)

    files/21201_21300/21283/file_21283.dcl   (rename tag_bom.dcl)

    0 Comment | Add CommentIn Controlling the Machine >

  • Extra Wire Number Display - AutoCAD Electrical
    April 5, 2008 12:05 PMby Nate Holt

    AutoCAD Electrical assigns a single wire number tag-ID on a per network basis. If you want to display this wire number assignment multiple times at various points on the wire network, the tools are available.

    But you might want certain electrical symbol connections to always show a copy of the connected wire number right at the point where the wire connects to the component. Again, the tools are there to add extra wire number copies that follow the main assigned wire number, but you have to manually position these.

    What if you want to just insert the electrical symbol and have these "extra" wire numbers come in automatically. There is a way to do this: you can add a visible attribute to the electrical component symbol, position it near where the wire connects, and AutoCAD Electrical will automatically populate it with the connected wire's tag-ID assignment.

    Here's how. Let's say you want your thermocouple symbol to always show the attached wire numbers - right at the symbol's wire connection points.

    Open up the symbol in AutoCAD. Here is the "before" version of the symbol. Note the two wire connection attributes on the right-hand side, "X1TERM01" and "X1TERM02".

    Add two new ATTDEFS. Make the tag names the same as the wire connection attribute name but with a leading "_" character. So, add ATTDEF _X1TERM01 and _X1TERM02 as shown below. Make sure that these attributes are NOT marked "Invisible".

     Save your modified symbol. That should do it. Now, when you pop this modified symbol into a new or purged schematic (purged of any old versions of this symbol), and run the Auto Wire Numbers command, you should see the wire number assignment displayed at the wire connection points of every instance of this symbol.

     

     

    0 Comment | Add CommentIn Controlling the Machine >

  • Tip: Terminal Strip Editor - speed-up
    April 4, 2008 03:41 PMby Nate Holt

    TSEditor wants to always work with an up-to-date wire connection table in
    the project scratch database. But if this gets in your way (you're working
    on a big project and you know that the out-of-date drawing(s) have changes
    that do not involve wire connections) you can manually launch TSEditor and
    skip the time that it takes to do the table update.

    Type this at command line:

    ACE_TSE_RESTART [Enter]

    I believe this should work in ACE2007-2009

    0 Comment | Add CommentIn Controlling the Machine >

  • Voltage drop and Green - AutoCAD Electrical
    March 20, 2008 10:55 PMby Nate Holt

    This writer is a product of parents whose childhood was totally shaped by the Great Depression. Their mindset was passed on to me. "Waste not, want not...". If you didn't clean your plate, odds are you'd see it again. And you'd always stoop to pick up a penny.

    And this one specifically from my mom... "You're burning a hole in the day!" - translation: "There's some daylight coming in through the windows, you don't need that electric light!".

    My first real job out of school, electrical engineer for a huge, brand-new flat glass manufacturing plant in the middle of the Carolinas. When things were running smoothly, I would look for stuff to do. There were some large, rarely visited utility rooms along one side of the factory. Every time I walked into one of them, I could just hear my mother's voice. Each room had long banks of overhead fluorescent lights... and they were always on! There was no light switch at the door - the lights were wired directly to the circuit breaker panel (cheaper to install this way), and it was very inconvenient to find the CB panel to turn the lights on and off . The result was they were always on, burning a huge hole in the day.

    Ran the numbers... 40 fixtures, two bulbs each, 40 watt cool white. 40 x 2 x 0.04kW = 3.2kW.

    Always on, so 24 x 365 x 3.2kW = 28000 kWh per year

    Back then we were probably paying 3 cents per kWh = $840/year.

    PLUS... the facility had to pay a "peak kW demand" every month, peaks that would happen where there was a major disruption in the glass flow through the furnace and annealing area. The 3.2kW in the utility room just added on top of this peak value charge each month.

    So, I got my electrician buddy to help and we ran a half dozen sticks of conduit, pulled a little wire, and mounted a wall switch at the door. That was 30 years ago and I believe the plant is still going strong. So, $840 x 30 = $25,200 and counting... all for a couple hours' work.

    Going green with Voltage Drop calculations

    Here's a less visible place where electrical losses can pile up... conductor heating losses. Let's say we have a 100 horsepower, 480 volt, 3 phase motor that pretty much runs all the time at 285 amps full load at 0.85 power factor.  The power wiring to the motor is about 400 feet. Based upon various factors, the National Electrical Code might show that 500KCMIL conductors should be able to handle the current.

    But what about the voltage drop in this length of wire run? And what is the "cost" of this voltage drop loss in the wiring, dissipated as heat in the wiring instead of reaching the motor to do useful work? Would it make "green" sense to go to the next larger wire size to reduce the voltage drop and thereby reduce the annual IR losses in the wiring?

    Here's a little AutoLISP utility that could help give a clue. I tried to make this follow what I found in the NEC. Hopefully it is accurate. The tricky part is including the power factor into the equation.

    The UI "user interface" is pretty crude. It just displays in the command window.

    To use, just APPLOAD this file (revised, see below)

    Then type PF3[Enter] at the "Command:" prompt.

    Let's run it on the example above...

    Command: pf3
    Wire size [? for list] =500
    Select 1=PVC, 2=Alum conduit, 3=Steel conduit:3
    Power factor [default=0.85]:0.85
    Amp current:285
    Wire length (feet):400
    voltage drop=9.84, kW loss=4.9

    Hmm... according to this little utility, will only have about 10 volt drop at the motor, well within spec. But this voltage at this 285 amp current, 3 phase, calculates out to almost a continuous 5 kW loss in the wiring.

    Let's say today's electrical rate is 7 cents per kWh. Our wiring loss (assuming motor is always running) will be 5 x 24 x 365 x 0.07 = $3066 per year. Seems like a lot.

    Let's run two 250KCMIL conductors per phase (142.5 amps in each wire) and try again.

    Command: pf3
    Wire size [? for list] =250
    Select 1=PVC, 2=Alum conduit, 3=Steel conduit:3
    Power factor [default=0.85]:0.85
    Amp current:142.5
    Wire length (feet):400
    voltage drop=7.24, kW loss=1.8

    Okay, voltage drop is better now, went from 9.84 volts down to 7.24. The kW loss is now 3.6kW (1.8 in each of the doubled up conductors). Our wiring loss cost will be 3.6 x 24 x 365 x 0.07 = $2208.

    So, according to this little calculation, we might save $800 per year by running double 250KCMIL wires instead of single 500KCMIL wires to our 100HP motor. Same amount of copper, just different conductor characteristics at this power factor value.

    Mom would be proud.

    PS. If anyone sees a flaw in my logic, please don't hesitate to raise an issue. Thanks! Nate.

    Update: revised the Lisp utility to deal with either Copper or Aluminum wiring (first version only dealt with copper conductors)

    files/21101_21200/21190/file_21190.lsp   (rename to pf3.lsp and APPLOAD it)

    0 Comment | Add CommentIn Controlling the Machine >

  • Backwards tagging from child to parent - AutoCAD Electrical
    March 16, 2008 07:31 PMby Nate Holt

    What if your parent/child insertion "workflow" is reversed? You first need to insert child contacts into your design. Then, when this child contact logic is in place, you pop in all of the parent coil symbols to support the various child contacts.

    This is opposite the expected workflow for AutoCAD Electrical - normally it is the parent coils go in first, receive their unique tag-ID values, and then you associate the child contacts to various parents. As you do this, the parent's tag-ID comes across to each child along with any description text you've tied to the parent.

    In this reverse workflow, you insert children before the parent tag-IDs are known. So, how to do it? Can it work with AutoCAD Electrical? Yes. Here's how.

    Step 1: insert child contacts into your control schematic logic. Assign a temporary "code" to each, perhaps the first line of description text that will eventually be assigned to the parent. In the example here, we've inserted  a N.C. contact and manually entered a tag-ID value of 52R_P1_UNDER_VOLT.

     

    Continue with this process, inserting child contacts and assigning codes that reference back to as-yet-to-be-inserted parent coils.

     

    Step 2: Now our child-contact logic design is complete. We're ready to start inserting enough parent coil symbols to support all our children... Insert relay coil symbol. The normal Insert/Edit Component dialog appears.

    Step 3 (above): But instead of going with the automatically assigned tag-ID, we need to temporarily make the parent's tag-ID match the child's temporary tag-ID. So select the "Tags Used: / Schematic" button shown above.

    Step 4 (below): This brings up the "CR Tags in Use" subdialog shown below. Pick on the "Show child references" toggle to list only child contact tags.

    Step 5 (below): Find the desired child by looking at the tag name "codes". Here we pick on the 52R_P1_UNDER_VOLT child entry. Hit OK and let AutoCAD Electrical temporarily push this child's tag-ID on to the parent relay coil.

    Step 6 (below): If you don't want to lose this "code" value, copy the text from the left-hand Component Tag edit box over to the right-hand "Line 1" edit box. Hit OK to dismiss the dialog.

     Here's where we are now (below). We have a relay coil with tag-ID 52R_P1_UNDER_VOLT which matches up with one or more child contacts that have the same tag-ID.

    Step 7: Now right click on the coil and select "Retag/Update".

     

    ... and let it retag the parent coil and also go across the project and update the tag-ID on the children for this coil.

    ... and here is the original child contact, now proudly carrying the tag-ID of the parent. Repeat the process for these other adoptable child contacts. Done!

     

     

     

    0 Comment | Add CommentIn Controlling the Machine >

Subscribe to Blog

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

RSS

Login

Register now to access tips, discussions and more.
Forgot your password ?

Categories

All

Blog Roll

Autodesk Manufacturing Blogs
The Evangelist Speaks
Jay Tedeschi shares his thoughts
Under The Hood
Brian Schanen on Vault, Productstream, and more.
In the Machine
Garin Gardiner's Blog
Controlling the Machine
Nate Holt's Blog
Drawing the Machine
Andrew de Leon on mechanical drafting and design
Recommended Blogs
Between the Lines
Shaan Hurley's AutoCAD Blog
Beyond the Paper
Scott Sheppard's DWF Blog
Lynn Allen's blog
Lynn Allen's blog
Featured Peer Blogs
Ask the CAD Geek
Expert Autodesk product knowledge, with heavy focus on Manufacturing
Area 31
Custom programming, design ideas and other interesting oddities
Cadgneto's Blog
Autodesk mechanical products
Sean Dotson's Site
Sean Dotson's mCAD Tutorials, Forums, Admins & more
The Autodesk Informer
Helpful sites, tutorials, and industry news

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback