Semi-auto execution of a ‘User Post’ – AutoCAD Electrical
Summary: Modify the report’s dialog control file (DCL file) to auto-select and semi-auto launch report post-processing (i.e. ‘User Post’). This should work on any AutoCAD Electrical report that has a ‘User Post” button option.
Eliminate repetitive picks
Let’s say that you often have the need to run AutoCAD Electrical’s Cable From/To report. It displays the extracted / formatted data in the report dialog. But you always need to format in the unused / spare conductors into the report. This means you must pick on the “User Post” button. Then you find the “unused core/conductors” toggle and turn it ON. Then you hit OK and the spare conductors get pushed into the display report.
But wouldn’t it be nice if this third toggle was turned “ON” by default? It would save one of the repetitive picks you do every time you have to run this particular report.
And one step better… let’s say that you ALWAYS choose this 3rd option for Cable From/To reports. None of the other options are ever used. Wouldn’t it be nice to just skip this option dialog altogether? You just hit “User Post” and that’s it? No dialog pops up, no selections required… the unused conductor entries just appear in the report the moment you pick on the “User Post” button.
Here’s how to do it.
Enhancement #1 – pre-selecting one or more options in the ‘User Post’ dialog.
Step #1 – Find the file name of the user post utility for the target report type.
Run the Cable From/To report and hit the “User Post” button. Cancel out. Now look at your command window. The full file name of the post-process utility is displayed here.
Step #2 – make a BACKUP copy of this file. Just in case.
Step #3 - open this file with any ASCII text editor (example: Wordpad.exe) or open with the Visual Lisp editor built into AutoCAD (type VLIDE [Enter] at the “Command:” prompt). You are looking at an AutoLISP program. There is one of these for every AutoCAD Electrical report type.
Scroll down to an area of the program that more or less looks like what is shown below.
We want to have the 3rd toggle option be set by default when the User Post options dialog displays. Carefully edit the line shown below. Change the “0″ to a “1″.
Step #4 – Save the file and test. Rerun the report. Select “User Post” button. Now you should see the 3rd toggle pre-selected ( ! )
Enhancement #2 – Pre-select and totally suppress display of the options dialog.
You can go the next step below if you always run option #3 for the Cable From/To report and never anything else.
Again, let’s be clear… as soon as the “User Post” button is selected, you want the unused conductor data to instantly pop in. It all happens with just a click of the “User Post” button.
If that’s what you want, reopen your edited file above. Carefully “comment out” the lines of code shown below. To comment out a line, just add a semicolon (; )character at the beginning of each line. What you are commenting out is the code that pops open the small options dialog.
The net effect here is that you are pre-setting a variable “user_3″ with the value of ”1″ that normally gets set by the dialog when you select the 3rd option and hit OK. So, you set it ahead of time in the program, skip calling the dialog (commented out), and then let the rest of the AutoLISP program do its normal thing.
If this doesn’t give expected results or you want to restore the previous behavior, just overwrite the edited lsp file with the backup you made in Step #2… you did make a back-up, right??
Add sounds to your too-quiet AutoLisp utility
Add audible feedback “sounds” to brighten your AutoLISP functions
Pretty much the totality of my AutoLISP customization has been mute. Last week I decided that it was time to make a little noise.
For example, if my function failed for some reason (operator input error or premature program exit), I wanted the tool to not just issue a little message to the command window… I wanted it to be accompanied with a clundge sound.
(acet-sys-beep …)
A search turned up a couple methods to embed some simple sounds into an AutoLISP function. The one way that seemed to work for me was using a call to “acet-sys-beep” and this only after I installed the “Express tool” option that comes on the AutoCAD install CD.
But once in place, there were three different sounds I could generate from this call. If you want to experiment, type each of these at the “Command:” prompt (if you don’t hear a thing, you may need to check for existence of the AutoCAD ”EXPRESSTOOLS” on your machine):
- (acet-sys-beep 16) [Enter]
- (acet-sys-beep 48) [Enter]
- (acet-sys-beep 64) [Enter]
Sample Utility that invokes a couple different sounds
Here’s an example function showing how two different sounds can be tied into success and failure of a function. This tool just swaps tag-ID values between two picked AutoCAD Electrical components. If the components are different types, then an error dialog is accompanied by a bad sound. If success, then a more happy sound.
This is not rocket-science. But it makes my mundane utility just a bit more interesting.
The two places where the sound is invoked is highlighted below. Just to be safe, in both places there is a call to confirm that function (acet-sys-beep…) exists… before trying to call it.
Updating drawings from scratch database edits – AutoCAD Electrical
Alternate to the Excel –> Project update tool set: edits to the project scratch database (Microsoft Access) updating the project drawing set.
This is actually the 5th installment of the Excel / AutoCAD Electrical tutorial. This is driven from an Autodesk webcast from a couple weeks ago by Autodesk’s Nathan Eliason. The first four blog postings were:
- Part 1 – Copy existing project drawing set, export “To Spreadsheet”, edit in Excel, update drawings “From Spreadsheet”
- Part 2 – Ability to not only push edited attribute values from Excel to the drawing set, but do “block swap” as well
- Part 3 – Enhancing the editing capabilities by adding your own custom attribute columns to an existing Excel sheet and having these work with the “From Spreadsheet” update tool
- Part 4 – Editing wire number assignments from Excel and then pushing the edits back into the drawing set
This is an alternate to using Excel. It may or may not appeal to you.
When using the Excel-based “To Spreadsheet” / “From Spreadsheet”, you had to first dump the project data out to Excel (the “To Spreadsheet” utility) before making edits in the speadsheet and then updating the drawing set (with the “From Spreadsheet” part of the tool-set).
Here, with this alternate approach, we use Microsoft Access and make edits directly to tables in the project’s “scratch database” file. When finished, we run a command called update “From Project MDB”.
The scratch database ”From Project MDB” tool is accessed from the same ribbon as the Excel tool set.
And it works similar to the update “From Spreadsheet” half… it goes through looking for differences between the edited database table(s) and the project drawing set. When differences found, it attempts to push the edits out to target attributes.
Step 1 – Before you select the “From Project MDB” tool, make a COPY of the current state of the project’s “scratch” database file. This file is in Microsoft Access format and is likely buried deep in a folder structure. Find its name as shown below. Make a working copy of this file by either opening up the file and doing a SAVEAS or using normal copy file sequence in Explorer or equal. Put this temporary working copy somewhere you can easily find it again.
Step 2 – Open up your working copy of the Access file in Microsoft Access. Here is where you can make edits to fields in various tables, paralleling what was presented in the Excel-based tutorial here.
Step 3 – After edits to the copy of the scratch database file are finished. Save the file.
Step 4 – Now launch the “From Project MDB” command. Select it from the AutoCAD Electrical menu as shown below. Browse to the edited copy of the scratch database file. Hit Open.
Toggle ON the tables that you’ve edited on this dialog (below). There are actually more options here than available in the Excel version of the tool.
Then hit OK. A dialog pops up asking you to identify what drawings you want to process. Then the update happens, just like with the Excel version (!)
Caution: Make sure that you are the only person currently working on the project between the time you make the working copy of the scratch database and you trigger the actual update with the “From Project MDB” tool. Otherwise, there is a chance that someone else’s edits to the common project drawing set made durng this short time could be overwritten when you trigger the update.
Tutorial – Using Excel with AutoCAD Electrical (Part 4 – Wire numbers)
(Part 4 – Editing wire number assignments from Excel and then pushing the edits back into the project drawing set)
This is the 4th installment of the Excel / AutoCAD Electrical tutorial. The first three were:
- Part 1 – Copy existing project drawing set, export “To Spreadsheet”, edit in Excel, update drawings “From Spreadsheet”
- Part 2 – Ability to not only push edited attribute values from Excel to the drawing set, but do “block swap” as well
- Part 3 – Enhancing the editing capabilities by adding your own custom attribute columns to an existing Excel sheet and having these work with the “From Spreadsheet” update tool
Part 4 – Wire number edits from Excel
We have the same ability to edit wire number assignments from the WNUM sheet of our Excel spreadsheet. Extract the spreadsheet as outlined in Part 1 above. Then go to the WNUM sheet…
Here we show a very small portion of one of the schematic drawings used in tutorial “Part 1″. There’s a 3-phase motor shown with the old wire number assignments and then how they show up in the “WNUM” sheet of our Excel file.
We just edit the wire number values right here in the Excel sheet. For example, we change 207B to 208-T1 and 208B to 208-T2.
When finished with our editing, we run the update “From Spreadsheet” (as outlined in tutorial Part #1) across our project drawing set and…
… the new wire numbers push out to the drawings.
If some of the existing wire numbers were “in-line” type, the gap in the wire will auto-adjust to correctly accommodate the new wire number text length.
Right from Excel you can re-assign wire numbers one-at-a-time, do global find/replace, or even create some macros to automate some wire numbering functions. Pretty cool.
Recommendation… after your edits to the WNUM sheet and you select AutoCAD Electrical’s update “From Spreadsheet” tool, consider setting the “Fixed” wire number toggle shown here:
Note: this Excel wire numbering update is not native to AutoCAD, but it is built into AutoCAD Electrical.
Tutorial – Using Excel with AutoCAD Electrical (Part 3)
(Part 3 – Adding your own custom attribute columns to the AutoCAD Electrical Excel spreadsheet, add data, then trigger drawing update)
Autodesk’s Nathan Eliason hosted a webcast last Wednesday that focused on AutoCAD Electrical’s ability to use Excel to edit its drawing sets. I helped put the demo together and was responsible for real-time Q & A support while Nathan was “on stage”.
This posting is a brief summary of what Nathan covered in the mid-part of the hour-long webcast – using Excel to quickly revise a copied project but enhancing the Excel sheet with some custom attribute columns. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature.
Part 1 of this tutorial, here, demonstrated the following sequence:
- 1) Copy existing project and drawings to new names,
- 2) Export the project drawing data “To Spreadsheet”,
- 3) Open Excel spreadsheet and edit, edit, edit
- 4) Push the edited data back to the drawing set using the “From Spreadsheet” utility
Part 2 of this tutorial, here, demonstrated how to go beyond just writing edited values back to existing attributes on the drawings. It showed how to trigger actual block swaps in the target drawings by editing the block name field in the Excel spreadsheet.
Part 3 – Adding custom attribute columns to the Excel spreadsheet
Now, Part 3 will demonstrate that you are not limited to the preset list of attributes that AutoCAD Electrical pushes out to Excel. You can go back in, after the spreadsheet is written, and customize it with additional columns. These can then be used to push additional attribute data back out to the project drawings.
The Scenario
Maybe we’ve modified our library symbols. We’ve added in some extra attribute definitions that are not standard AutoCAD Electrical. For example, on panel footprint symbols for pilot lights we’ve added a “COLOR” attribute to show a color abbreviation. For example, “R” for red, “G” for green, “A” for amber.
But there is no “COLOR” column extracted by the “To Spreadsheet” command. So there is no place to type in a different value for the color attribute value. We don’t have an option to push Excel-edited values out to non-supported attributes.
Are we out of luck here? No, there’s a work-around.
After the Excel spreadsheet is created, we can add some more labeled columns to it. We can insert a new column with a column label of “COLOR” and then type new values into it !
Then, any non-blank values entered into this new column will attempt to find and update the attribute whose name is at the top of the column.
So our non-blank values in the “COLOR” column trigger the Update “From Spreadsheet” utility to look for the target attribute “COLOR” on each component. If present, then the attribute COLOR is updated.
In our example here, the pilot light panel footprint symbols in our project are updated with new color codes pulled directly from our column-added spreadsheet.
Conclusion / Summary
You are not limited to the attributes that Autodesk defined in the “To Spreadsheet” utility. You can add more attribute columns ”after the fact” (i.e. after the initial version of the spreadsheet xls file is written out by AcadE). Add data to these new columns. These then become active when you later run the “From Spreadsheet” utility to update the project drawing set.
Tutorial – Using Excel with AutoCAD Electrical (Part 2)
(Part 2 – Block swaps from Excel edits)
Autodesk’s Nathan Eliason hosted a webcast on Wednesday that focused on AutoCAD Electrical’s ability to use Excel to edit its drawing sets. I helped put the demo together and was responsible for real-time Q & A support while Nathan was “on stage”.
This posting is a brief summary of what Nathan covered in the mid-part of the hour-long webcast – using Excel to quickly revise a copied project. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature.
Part 1 of this tutorial, here, demonstrated the following sequence:
- 1) Copy existing project and drawings to new names,
- 2) Export the project drawing data “To Spreadsheet”,
- 3) Open Excel spreadsheet and edit, edit, edit
- 4) Push the edited data back to the drawing set using the “From Spreadsheet” utility
So, in the example above that ended Part 1 of the tutorial showed Excel spreadsheet edits finding their way back to two different drawings in the active project drawing set.
How does this work?
So, how does this update work? We could have hundreds of drawings in our project and tens of thousands of components, terminals, and wire numbers in our project. How does this simple spreadsheet edit know what goes where?
It’s pretty simple. There are two key columns that need to appear somewhere in each sheet of the spreadsheet:
(FILENAME) – gives the drawing name of the target drawing
(HDL) – gives the AutoCAD “handle” value assigned to each block insert instance
Together these two values uniquely identify each block insert instance used in an AutoCAD Electrical project drawing set. And this is what the “From Spreadsheet” utility uses to uniquely match a row in the spreadsheet with a block insert instance found somewhere on one of the drawings in the overall project drawing set.
So, in the example shown above, the green highlighted row in the spreadsheet maps back to a block insert instance on drawing “2011_LINE202.dwg” with handle number “40B”.
Not all data columns can be written back to the drawing. For example, in the COMP table shown below, there is a column labeled “(REF)” that gives the calculated line reference or X-Y grid reference of the extracted component.
Manually forcing a different value into the “(REF)” field and then running update “From Spreadsheet” will NOT cause this component to move to some other line reference or grid reference on the drawing. That is beyond the scope of this tool. Likewise, changing the drawing name field value for a component will NOT trigger that component to move from one drawing to some other drawing. Again, beyond the scope of this tool.
So, of the 39 fields of the COMP sheet, five of them are not “updateable”. These are marked with column names enclosed in parenthesis. The other 34 fields will trigger updates on components on the drawings.
Block swap from Excel edits
Okay, looking at this COMP Excel sheet, something doesn’t seem right here…
…fields shown in parenthesis are supposed to be not update-able. But shouldn’t the symbol’s block name be frozen as well? Shouldn’t the field label “BLOCK” really be “(BLOCK)” in parenthesis???
Does this mean that I can change a block name in the spreadsheet from one name to some other name? Won’t AutoCAD consider that to be illegal?
For example, on the 5th row down in the sheet shown above I have a push-button tagged as “PB422″. The BLOCK column carries a value of “HPB11”. This is the symbol’s actual “block” name, extracted by AutoCAD Electrical and pushed into this row of the spreadsheet along with 38 other pieces of data related to it. According to AutoCAD Electrical’s symbol naming convention, this tells me that it is a N.O. parent push-button symbol.
Question: What happens if I edit the spreadsheet and change this block name from a push-button to a 2-position N.C. selector switch symbol, “HSS122” ???
Answer: The update “From Spreadsheet” tool will execute a “Block Swap” operation. It will take out the HPB11 symbol, find and pop in symbol HSS122, reconnect the wires, and push the attribute values back on to this new symbol ( ! ).
UPDATE: this swapped block can be either a local block on the drawing (i.e. already used elsewhere on the drawing or defined but not purged) or it can reference a library symbol “.dwg” file somewhere in the AutoCAD Electrical or Acad support path list. The swap function will search for the block and, if found, pull out the old block, pop in the new, adjust wire connections if the new block is smaller or wider than the original, and push the attributes back out to it.
So, what have we discovered here? Not only can this tool push edited attribute values back out to existing block inserts on any drawing in our project set, but we can even trigger it to swap out one type of block symbol for another! This is pretty cool.
UPDATE2: this is not native AutoCAD behavior, it is native AutoCAD Electrical behavior.
Tutorial – Using Excel with AutoCAD Electrical (Part 1)
Autodesk’s Nathan Eliason hosted a webcast earlier today that focused on AutoCAD Electrical’s ability to use Excel to edit its drawing sets. I helped put the demo together and was responsible for real-time Q & A support while Nathan was “on stage”.
This posting is a brief summary of what Nathan covered in the first part of the hour-long webcast – using Excel to quickly revise a copied project. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature.
Re-cycling a Copied Project – Using Excel to Re-tag/Re-number/Re-assign
Let’s stretch our imaginations today. Let’s pretend that the economy is starting to pick back up.
Word coming down from corporate headquarters is that we need to add another production line. This will basically be a copy of the one we designed with AutoCAD Electrical a couple years ago. We’re happy campers.
To speed things up, we just want to re-cycle the existing AutoCAD Electrical project. This means copying it and its drawings to new names. Then, to finish, we need to do some re-tagging components and wire numbers to keep them unique from the original production line. And we’ll probably need to make a few adjustments in catalog part number assignments.
The edits to component tags, wire numbers, and catalog assignments can be eased by using Excel as an editing interface to the copied drawing set.
So in our tutorial today, let’s go through the steps of how to do this. We’ll just use the demo project that ships with AutoCAD Electrical as our “existing” project that we will copy and modify using Excel.
Note: this Excel-editing capability has been in AutoCAD Electrical for many, many releases… it is not limited to the latest ACE 2011 release.
Step 1 – make a copy of the existing “WDDEMO” project and its drawings
You can do this by hand using normal Windows file copy and file rename…
** OR ** – you can just use the Copy Project tool built into AutoCAD Electrical. Let’s use the tool…
1.1 Go to the “Project” portion of the AutoCAD Electrical ribbon.
1.2 Select “Copy” button near the left-hand end of the ribbon
1.3 Select the “Copy Active Project” button
1.4 Enter a unique, new name for the copied project. Let’s call it “WDDEMO_LINE2”.
1.5 Now select all drawings from old project to copy into this new project. The old drawings remain in the old project… we’re just making copies of the “.dwg” files to move into this new project.
Note: is you have even one of the selected drawings open in your AutoCAD session, the Copy Project command will stop right here with an alert dialog. You’ll need to close that drawing or drawings and start over ( ! ).
1.6 Find/Replace to adjust the copied drawing names and hit OK.
Now we’re ready to go. Our old project and drawings are copied and renamed…
… but they remain a carbon-copy of the original project drawing set.
Our new project requires us to edit tags, wire numbers, and make some changes in catalog part number assignments.
We can use some of the editing tools in AutoCAD Electrical, pick and edit. But wouldn’t it be nice to just do these edits from within the comfortable environment of an Excel spreadsheet ?!!
Let’s do it !
Step 2 – Dumping the Project to Excel
So we’re going to use AutoCAD Electrical’s Excel editing interface to adjust tags, wire numbers, and catalog assignments of our copied drawing set.
First step is to dump the project drawing set’s data out to an Excel spreadsheet. Here’s how:
On the ribbon under “Import/Export Data” we select the “To Spreadsheet” tool.
On the dialog that pops open let’s pick the “General” category output. This will dump about eight different categories of project data out to an Excel spreadsheet.
We select “Project” and identify what drawings in the project we want to dump to the Excel spreadsheet (that step’s dialog not shown here).
The last step is to identify a name of the new Excel file. We’ll just let it default to the name that the tool suggests.
Step 3 – Open Excel Spreadsheet, start Editing ( ! )
Important note: AutoCAD Electrical expects to see the spreadsheet field values as “text” and not as “numeric”. If your editing results in some numeric values in some of the cells (text will appear right justified), then AutoCAD Electrical may have difficulty when it tries to read and move edited values back out to update the drawings. Force your edits to be text (one way is to enter pure numeric values with a leading ‘ character, another is by using a macro built into the spreadsheet – see comment at the end of this posting).
We find eight sheets of data, one sheet holding data of a given “category” extracted from the copied drawing set.
For example, the sheet with the “COMP” label (left-hand tab) carries data extract from schematic components and the next sheet, “TERM”, carries data extracted from all schematic terminals found in all drawings of our copied project.
Taking a closer look at the COMP sheet (schematic components).
Each row beginning with the second row gives data extracted from a schematic component block insert instance found in the drawing set.
And the first (top) row is a list of column labels. It gives each column a name that identifies the column’s data type. The data type can be a general category of data or actual block attribute tag-name.
In the example shown above, the component from the schematic carries a dozen or so attributes. Some display as visible text and some are marked invisible. But all are extracted into the component’s row in the COMP table of the spreadsheet.
So the idea here is to now go in the reverse direction… edit values in the spreadsheet and then trigger AutoCAD Electrical to push these edited values back to the component block inserts in the project’s drawings.
Let’s say we do a find/replace in this Excel sheet and manually edit a few other values. Or maybe you get more sophisticated and create some Excel macros to automate making these edits in the spreadsheet.
In any case, whether by manual edits or some cool automation you come up with, when finished, save the spreadsheet.
So, in our example here we’ve highlighted the TAGNAME and the LOC columns and have done several find/replace operations to rename groups of fuse and motor tags and to assign a renamed panel LOC location.
Step 4 – Trigger the Excel –> Drawing update
Now we’re ready to push the data in the updated spreadsheet back out to our AutoCAD Electrical drawing set.
Select the update “From Spreadsheet” tool. We reference our edited Excel spreadsheet.
We select what drawings we want to process (we select the whole project).
Hit OK. And in a few moments our project drawing set is updated per the edited attribute values carried in our spreadsheet.
Results
So, how should this Excel –> AcadE project drawing update work?…
Just picking one example above.
The old project’s tag-ID for this motor starter coil and its child contacts is “M414”. Via our Excel edit, we’ve changed all “M414” instances to “MT-414” for our new project drawing set.
Then running the AutoCAD Electrical update project “From Spreadsheet”, the tag-ID assignment for this motor starter coil on one drawing (the lower left-hand image) and its three power contacts and one auxiliary contact on another drawing should auto-update to match our edited Excel spreadsheet.
Attributes do not have to be visible to update. Attributes marked invisible will update if their values have been changed in the spreadsheet. This means that if our spreadsheet edits include catalog part number assignment changes, those attribute values (normally invisible) will update as well.
Notes
AutoCAD Electrical works best when the spreadsheet edits to be text format and not numeric. A mixture of numeric and text values in the same column of the spreadsheet is especially troublesome. Force all edits to be text. One way is to enter a leading ‘ character for numeric values input into a cell. Another way is to enable the macro content held in the spreadsheet and then run the built-in macro shown below:
Using Excel with AutoCAD Electrical – upcoming webcast
This may be of interest to a few folks… overview of using Excel to modify extracted data from AutoCAD Electrical projects and then have the Excel edits actually update the drawings (i.e. attribute value updates and even block swaps). As a bonus, there will also be a presentation of a technique of using edits to AutoCAD Electrical’s “scratch database file” to do the same thing.
This will be an Autodesk “webcast”, about 45 minutes or so, on Wednesday, 11-August-2010 at 10am PST. I will be involved in the text-mode-only Q&A during and after the presentation by Autodesk.
You can register for this free webcast here.
Adding custom option to Insert WBlock Circuit command – AutoCAD Electrical
Preserving pre-positioned wire number locations in the inserted circuit (i.e. bypassing AutoCAD Electrical’s auto wire number centering feature)
Developing a nice, custom application for auto drawing generation was being thwarted. The application would pop in various circuits into the overall drawing. Some of these circuits were set up with aliased wire numbers at pre-defined wire number locations designed to give a pleasing appearance.
But pushing these circuits into the drawing using AutoCAD Electrical API call “(c:wd_ins_circ2…)” was doing too much clean-up. It would see the existing wire numbers come in with the selected Wblocked circuit and try to “center” each on its wire segment.
The desired behavior is that AutoCAD Electrical do everything BUT re-center any existing wire numbers. I wanted the pre-positioned wire number positions to be held where I had defined them in the Wblocked circuit. So, in the example above, the original wire number positions as carried in the WBlocked circuit .dwg file would be where each full wire number would appear and would “stick”.
But there was no option for this API call to trigger the function to skip re-centering existing wire numbers. What to do???
Necessity is the Mother of Invention
That’s what my mother would sometimes quote to me growing up… when I asked for something that just didn’t seem to be available. And she learned it from her parents as she grew up during the Great Depression. Researching this a bit, looks like the originator was Plato. Guess this is one of those deja vu things.
Let’s see what we can come up with.
We turn on the AutoCAD Electrical “Trace mode” and then insert our circuit. You can manually turn this on by typing this at the “Command:” prompt: (setq Aw_Debug 1) [Enter] (and turn it off by typing (setq Aw_Debug nil) [Enter]).
The command window gives a long, cryptic sequence of what internal calls AutoCAD Electrical makes as it inserts the circuit, reconnects wires, re-tags components and RE-CENTERS any existing wire numbers ( ! ).
Here is a screen shot of some of this output. A clue is highlighted…
So we give it a shot. We type this in at the command prompt:
(defun wd_wnum_calc_good_wnum_locs ( a / ) nil )
What this does is redefine this internal AutoCAD Electrical function for just the active drawing on-screen (this is because AutoCAD Electrical loads a copy of its executable into each drawing as it opens on screen). Our temporarily redefined function just returns nothing or “nil” when it is now called. We try the circuit insert and get a “wrong number of arguments” error. Let’s try again… maybe there are two arguments for this internal AcadE function…
(defun wd_wnum_calc_good_wnum_locs (a b / ) nil )
Bingo! It works!
Is this a good idea. Donno, but again… it seems to work.
Wrapping up our solution
Okay, let’s clean this idea up a bit. Let’s put a “wrapper” around the standard AutoCAD API call for inserting the WBlock circuit. But this wrapper will first save the existing version of the “(wd_wnum_calc_good_wnum_locs…)” function. Then it will redefine it to have it do nothing. Then we make the normal call to the “Insert WBlock Circuit” command. And we finish by restoring the original behavior of “(wd_wnum_calc_good_wnum_locs…)”.
Here’s what our wrapper around the standard API call might look like:
Now, whenever I want to insert a circuit but NOT have it auto re-center existing wire numbers, I make a call to (c:wd_ins_circ2x…) instead of the normal AcadE API version (c:wd_ins_circ2…).
QSELECT driving PROPERTIES command – AutoCAD Electrical
The AutoCAD PROPERTIES command can be driven by a filtered selection set created by the QSELECT (Quick Select) command or sub-dialog.
Working on a potential customer’s sample drawing, I converted a complex collection of dumb graphics into an AutoCAD Electrical “smart” symbol. Works fine but the wire connection attributes ended up being very tiny because the graphics was scaled in metric units and the default wire connection attribute definition text size was coming in assuming imperial units.
Normally would have just moved on… the converted symbol works great. But the wire connection points are hidden behind connection dots that are part of the symbol. I’d rather these wire connection attributes be big enough to at least extend a bit beyond the dot so that it is obvious that they’re there.
So, how to quickly adjust the text size of these 60+ wire connection attribute definitions? Could write a little AutoLISP utility… but how about using something already built into AutoCAD?
QSELECT and PROPERTIES command
The PROPERTIES command seemed like the right tool to make the actual text height change. But how to carefully select the 60-plus attribute definitions, almost all of which are hidden behind other graphics?
With a little tinkering, the “Quick Select” mode with filtering did the trick. Here’s the sequence:
This should bring up the “Quick Select” sub-dialog. If it does not, just type QSELECT [Enter] at the AutoCAD ‘Command:’ prompt. Select Attribute Definition as shown below.
And we want to filter on the attribute definition Tag names. The wire connection attributes expected by AutoCAD Electrical follow the naming convention X?TERM?? where the first “?” is a 1, 2, 4, or 8 and the last two form an incrementing number value (starting at “01″). So we’ll just enter in X?TERM?? where the “?” wild-card represents any single character.
That’s it. We hit OK and the “Quick Select” finds 62 attribute definitions that have a “Tag” value that wild-card matches string ‘X?TERM??’.
Now, the fun part. Adjust the text size in the PROPERTIES dialog and all 62 tiny attribute definitions resize and now reveal themselves!
Generic text/mtext/attrib/attdef Find/Replace utility – AutoLISP
Enter substrings for “find” and “replace”… then pick/pick/pick on TEXT, MTEXT, ATTRIB, ATTDEF text string values to update.
Frustration setting in as I worked on AutoCAD libraries for an electrical sub-station design application… copy circuit to a new drawing name, open, then use an attribute edit command to change a substring value in a dozen or so attributes. A little Find/Replace tool would be so welcome right now!
After 20 minutes of this tediousness, decided it was time to either find an existing tool or create a quick one. Found previous posting for a drawing-wide MTEXT find/replace utility. Good place to start.
Solution
Here is the result. Seems to work.
The flow is 1) enter “Find” substring, 2) enter “Replace” substring, 3) start picking on text. The text can be attributes, text entities, attribute definitions, and even multi-line text (multi-line attributes not covered in this version).
Here is an overview of how the original version was modified.
Step 1 - Renamed the source “.lsp” file to “text_fr.lsp”
Step 2 - Got rid of the drawing-wide “ssget” and changed to a loop of individual text picks (below).
Step 3 – added two blocks of code to deal with Attributes/Attribute definitions and with straight Text entities (below).
That should do it. It seems to work for me… speeded-up my effort to copy and modify my folder of sub-circuits.
Here’s a simple example of it in operation. Starting out with a sample drawing that contains the substring “DN100″ in three different places: an attribute that is part of a block insert instance, a single line of text, and a 3-line multi-line text entity just below it.
Let’s say we want to selectively change instances of “DN100″ to now be “CM99″.
With the utility APPLOADED (download revised version here - see update note below) we launch by typing TEXT_FR [Enter] at the “Command:” prompt.
To use… just APPLOAD the text_fr.lsp file. Then
1. Type TEXT_FR [Enter] at the AutoCAD command prompt
2. Enter the “Find” substring, Enter the “Replace” substring
3. Start picking on individual Text, MText, Attribute or Attribute Definition entities
There it is. Seemed to work really well for me!
UPDATE: user note below correctly points out that if this tool used to find/replace attribute values for AutoCAD Electrical “TAG1″ attribute values, there is a good chance (especially if “IEC” tag mode is active) of confusion. This is because there is an Xdata tag name “VIA_WD_BASETAG” that is pushed out to parent components. This Xdata value carries the base copy of the overall component’s tag-ID. If the tag-ID is changed by our utility above, then this Xdata value needs to be processed as well. Here is a screenshot of the addition to our utility to deal with keeping this Xdata in synch. This code addition should lie dormant unless the tool is used on a “TAG*” attribute with AutoCAD Electrical in memory.
Tutorial: Basics of ‘Smart’ Panel Layout (Part 3) – AutoCAD Electrical
Reverse work-flow: design panel layout first, then drive schematics from the list of panel layout components.
Autodesk’s Dustin Clark hosted a webcast earlier this month that focused on AutoCAD Electrical’s ‘smart’ panel layout feature. I helped put the demo together and was responsible for real-time Q & A support while Dustin was “on stage”.
This posting is a brief summary of what Dustin covered in the middle part of the hour-long webcast. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature. Note: links to the summaries of the first and second parts of the webcast are here:
Tutorial – Basics of ‘Smart’ Panel Layout (Part 1)
Tutorial – Basics of ‘Smart’ Panel Layout (Part 2)
So, here we go…
We ended the previous tutorial with showing how AutoCAD Electrical can make it easy to pick and place panel footprint representations by simply picking from a “Schematic list”.
This assumes that you’ve created a first cut of your controls schematics first before you begin to do the panel layout design.
But what about the reverse work-flow? Let’s say you need to quickly add a couple motor starters to your custom enclosure design. The panel is a long lead-time purchase… you’ve got to get this thing on order and the panel design needs to show the motor starters. Adding the control schematics that actually show the wiring for these motor starters will have to wait.
So, the workflow is reversed… the panel layouts happen first. Then come the control schematics.
How does AutoCAD Electrical help support this workflow? Let’s try it.
Here’s one way to do the reverse workflow… to insert a motor starter panel footprint representation (screen-shot above). From the “Panel” ribbon select “Icon Menu”. Find and open the “Motor Control” page of the panel footprint icon menu. Select “Starter Coil” (above).
Let’s say that our first motor starter needs to be a NEMA size 4 non-reversing. Just select the “Catalog lookup” button in the dialog above. We pick the desired NEMA 4 contactor’s catalog part number from the Catalog Lookup dialog and hit OK.
AutoCAD Electrical takes our catalog assignment, goes to the “Footprint lookup” database (as it did in the previous tutorial), and finds the physical footprint representation that wild-card-matches with our selected manufacturer’s catalog part number.
The correct footprint attaches itself to our cursor and we pop it into a clear place on our backplate.
Then the Insert/Edit dialog automatically opens up.
Let’s say that the schematic is ultimately drive the tag-ID that gets assigned to this motor starter.
For now, we’ll just manually type into the dialog shown above an “aliased” tag-ID name, “CONV MTR – NEMA 4”.
Okay, in the screenshot above we’ve added our two extra motor starters to the panel layout. We gave them temporary “aliased” tag-ID names for now. This is because we have not yet added in these two motor starter coil symbols to the schematics.
We can extract a BOM report from the panel layout components and get the major equipment stuff on order now.
=========
Now, several weeks later (and with the panel items on order), you have the design information needed to figure out the control requirements for these two extra motors. Time to add them to the schematics. They’re already on the panel layouts, you just want to push them into the schematics (the “reverse workflow” from the examples in the first tutorials).
Here is the sequence. With the target schematic drawing “active” on the screen, select the “Schematic” insert from “Panel List” command.
This brings up a list of all panel devices found in the drawings of the active project (screenshot above). Scroll down and there are the two added motor starter footprints (highlighted in yellow in the screen shot). There is no “x” in the first column so that tells us that they are not yet accounted for in our schematic design.
We pick on the first motor starter entry and make sure that the “TAG Options” radio button is set to “Use auto-generated schematic TAG”. What this does is let the tag-ID generated for the schematic symbol be the “master”. It will drive backwards to the panel layout and update/replace our “aliased” tag on the footprint.
We hit the “Insert” button on the bottom of the pick list dialog.
(Screenshot above) Finally, we need to select a motor starter schematic coil symbol for insertion. We can do it from the normal schematic icon menu or pick on a nearby motor starter coil symbol if one already used on the drawing.
Coil pops in at our pick point on the wire (screenshot above). Normal schematic Insert/Edit dialog pops open with a calculated tag-ID for this motor starter coil. Other values pulled from the panel footprint version are also pre-populated in the dialog. We just hit OK…
… and AutoCAD Electrical pushes the new, calculated schematic tag-ID back to the motor starter footprint on the panel layout drawing, replacing the original “aliased” tag-ID name.
Conclusion
There it is, the “reverse” workflow.
1. We inserted panel items first. Gave them temporary aliased tag-ID names.
2. Added catalog part numbers and description text to the footprints
3. Later, when ready to do the schematics, we referenced the “Panel List” insert mode
4. Selected schematic symbols for each panel footprint. The calculated tag-IDs generated on the schematic then went back and updated the panel footprint representations.
Sorting BOM report on USER1 field – AutoCAD Electrical
How to create a BOM “user post” to map the report’s USER1 values into a field that can be selected for sorting.
A limitation with AutoCAD Electrical’s BOM report display dialog is that it is only set up to allow sorting on just a handful of the possible display fields.
For example, a “Tallied BOM Report” for panel layout shows there are only four fields available for sorting: ITEM, CATALOG, MFG, and TABNAM where TABNAM refers to the catalog lookup database table name.
But let’s say that you really, really, REALLY want to sort on the report’s USER1 field value. You’ve set USER1 up in the catalog lookup database file (default_cat.mdb) to carry your company’s internal part codes. The existing CAT and MFG field values will carry the vendor part number… but you really want your report sorted by these USER1 internal part number codes.
If you really want to do this, here’s how. It ain’t pretty… but it works.
The workflow will be to select the “User Post” button. It will have a new option (that we’re going to add shortly) that pre-processes the BOM report data. For each line in the BOM, it finds the USER1 field value and copies it over into the rarely used TABNAM field. Now, we sort on this TABNAM field (which is one of the four supported sort fields and now actually carries a copy of the USER1 field values). The net effect is that our displayed BOM report now appears to be sorted on the USER1 field values ( ! ).
We have to alter the two support files for the tallied panel BOM report. These are the small dialog file pnlbom.dcl and the AutoLISP utility pnlbom.lsp. Use any ASCII text editor or use the Visual Lisp editor built into AutoCAD (type VLIDE [Enter] at the command prompt).
Important: Before you start, make BACKUPs of both files… just in case ( ! )
Here is the change for pnlbom.dcl edit:
And here is the bompnl.lsp file. There should be a comment section that describes the structure of the report data list that is used to drive the report dialog. We find the two items that we’re interested in… the existing “TABNAM” field position in the list and the “USER1″ field position in the list. We want to take a copy of the USER1 value in each line of the list and dump it into the TABNAM value in the list.
Now, using the 12th and 15th positions determined above, here are the bompnl.lsp file additions (highlighted in yellow).
Applying to other BOM reports?
Question: Can I do this to some other BOM report? Answer: Yes, just follow the above example and make similar changes in the other BOM report’s user post “.lsp” and “.dcl” files… it should work.
User-post: import component descriptions into Cable From/To reports – AutoCAD Electrical
Customize existing report to include assigned description text of devices at each end of the cable.
About 18 months ago we blogged here about how to modify the “Wire From/To” report to include the three lines of description text carried by the connected component found at each end of the reported wires. This is not an option in shrink-wrap AutoCAD Electrical, but is possible by enhancing an existing “user post” utility for the wire from/to report.
The way this all works is: AutoCAD Electrical extracts and formats the report data. It then displays a copy of this data in its report dialog. User can massage the report a bit by sorting on a data column or adding or removing pre-defined data columns from the report. But if the user wants to go beyond what is provided in the stock report, he can opt to invoke a “user post” utility specific to the displayed report type.
The “user post” is an AutoLisp program that is called from the “User Post” button on the report dialog. It is designed to take the original data, re-format it in some custom way, and then push the data back to the report dialog.
Neither the stock “Wire From/To” report nor the “Cable From/To” report includes an option to have the “From” and “To” connected component description text show up in the report. But the previous posting described how to appropriately modify the two existing AutoLisp program files that drive the “user post” utility for the Wire From/To report (files wirefrm2.lsp and wirefrm2.dcl). The idea was to extract the thee lines of description text for the component at both ends and then push this extra data into six unused fields (i.e. rarely-used fields) of the existing Wire From/To report – report column names PNLX1, PNLY1, PNLZ1 for the three lines of description text for the “From” component connection and PNLX2, PLNY2, and PNLZ2 for the “To” component connection.
But the enhancement described in this previous posting only applies to the Wire From/To report type.
This morning a user asked about modifying the Cable From/To report to do the same thing. The steps below describe how to do this by making similar additions to the cable from/to report “user post” files: cablecon.lsp and cablecon.dcl.
Enhanced User Post for Cable From/To report
We’ll find and modify the Cable From/To user post “.lsp” file and its dialog “.dcl” file. The full path/file name of the “.lsp” user post file is displayed in the command window when you display the report and then pick on the “User Post” button. The separate ”.dcl” file that defines the utility’s small opening dialog will be in this same folder. Alternately, type this at the “Command:” prompt to get the path (ignore the doubled-up backslashes in the returned path):
(c:ace_find_file “cablecon.lsp” 3) [Enter]
Step 1: Find the folder where these files reside (above) and make backup copies of each, just in case (files cablecon.lsp and cablecon.dcl)
Step 2: Edit the dialog source file “cablecon.dcl”
We open this file with any ASCII text editor or with the standard AutoCAD Visual Lisp editor tool (type VLIDE [Enter] at the AutoCAD command prompt). Add these lines to the file and then save it.
Step 3: Program the 4th new option into the cablecon.lsp utility. We open with any ASCII text editor or with the standard AutoCAD Visual Lisp editor tool as described in the previous step. Scroll down just a bit and find this part of the existing program. We add in two lines to interact with the new option we defined in the small opening dialog (in Step 2).
Step 4: Next we have to figure out where individual report fields are located in each line of report data. Each line is a long list of concatenated data elements. This layout is documented in a comments section of the cablecon.lsp file. It is reproduced here:
It looks like the key elements of each data line are these: the “From” component’s handle and drawing index (which drawing the component is on) are element index numbers 47 and 49. The “To” component’s are 48 and 50. And the rarely used, existing fields we want to push the description into are at index offsets 60-62 and 64-66.
Now scroll down to near the end of the cablecon.lsp file. Here is where we push in a new chunk of AutoLISP code (highlighted in yellow below).
Save the edited file… or, just download from here and here and push into the appropriate folder so AutoCAD Electrical finds these new versions instead of the stock versions.
Testing
Run the Cable From/To report normally. When the report displays in the report dialog, hit the “User Post” button. You should now see a new option at the bottom of the dialog. Select it and hit OK.
The report displays as before. But the component descriptions should now be available in the rarely-used report fields PNLX1-PNLZ1 for the “From” component and PNLX2-PNLZ2 for the “To” component. Hit the “Change Report Format” button and add these fields to the report display. Rename them if you’d like.
After making these changes, AutoCAD Electrical will “remember” these and make them the default the next time the report is invoked (report settings are saved in the cablecon.set file held in the “USER” folder).
Tutorial – Basics of ‘Smart’ Panel Layout (Part 2) – AutoCAD Electrical
Overview of how AutoCAD Electrical can link control schematics to the panel layouts and track what has and has not been inserted.
Autodesk’s Dustin Clark hosted a webcast earlier this month that focused on AutoCAD Electrical’s ‘smart’ panel layout feature. I helped put the demo together and was responsible for real-time Q & A support while Dustin was “on stage”.
This posting is a brief summary of what Dustin covered in the second 10 minutes or so of the hour-long webcast. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature. Note: the first part of the webcast is summarized here:
Tutorial – Basics of ‘Smart’ Panel Layout (Part 1)
So, here we go…
We ended the previous tutorial with showing how a schematic symbol representation is linked to its panel-layout counterpart. This means that editing one representation can trigger automatic update of the other.
So, how is this schematic to panel update made possible?
The link between schematic and layout versions of the same component is made through nothing more than the tag-ID assignment on each. If the tag-ID assignment matches, then AutoCAD Electrical considers them to be linked.
What is the tag-ID? It is an attribute value.
Yes, an attribute value… AutoCAD Electrical uses normal AutoCAD “blocks” with attributes for both schematic symbols and for panel layout representations.
And one of the attributes on each type of representation is assigned to carry the component’s tag-ID assignment.
For a schematic component like a relay coil symbol or pilot-light or switch symbol, the tag-ID value is assigned to the “TAG1” attribute.
For the panel layout component, that tag-ID value is assigned to an attribute called “P_TAG1”.
So, if a schematic instance of a red pilot-light symbol attribute TAG1 with a value of “LT409” and if a panel layout showing the physical placement of a pilot light carries attribute “P_TAG1” with a value of “LT409”, then this is sufficient for AutoCAD Electrical to consider them “linked”.
================
SIDEBAR: the more complex IEC-style tagging – how the link is established
If the AutoCAD Electrical project is selected to operate in “IEC tagging mode”, then two more attributes are included to establish the link.
These are attribute “INST” for an IEC installation assignment and “LOC” for an IEC location assignment.
In this example, the schematic relay symbol carries three attributes INST, LOC, and TAG1 with values “L2”, “MC”, and “K14” respectively. These values are concatenated into a full tag-ID string of “=L2+MC-K14”. It is this full, concatenated tag-ID that must match up between a symbol on the schematic and a physical representations on a layout drawing – when match, then AutoCAD Electrical considers the pair of components as linked.
So, summarizing, in normal mode (i.e. non-IEC tagging mode), it’s just a match on the one attribute. In IEC mode, it is a combined match on the three attributes.
================
Once schematic and panel representations are linked with the common, unique tag-ID value, this makes possible the following:
- Update description or rating attribute values
- Change catalog assignment on one can update the other. If the catalog assignment change means that the physical layout symbol needs to change, this update can happen as well.
- Re-tagging one will update the other.
- Deleting one will prompt for permission to delete the other.
- Schematic wire connection information can be automatically pushed to annotate a “wiring diagram” version of a panel layout representation.
Question: Link requires matching tag-ID text… does this mean I need to enter the same tag-ID two times? One time on the schematic representation and then, when I insert my panel footprint for that component, I need to remember what I used so that I can put the same tag-ID attribute value on the panel?
Answer: No. You don’t have to enter the data twice. With AutoCAD Electrical you just pick from a display list.
Example
Let’s say that you have pretty much finished the first pass of your schematic design. Now you’re ready to start laying out the control panel. What tools are available in AutoCAD Electrical to help move things along with the panel layout and also reuse as much data from the schematic as possible?
Let’s look at the insert panel footprint from “Schematic List” tool.
This extracts a list of parent schematic components found on the schematic drawings and presents this in a pick list dialog (below).
Now, with the list of schematic components displayed…
… you pick on the schematic entry for a target component. The tool attempts to find the appropriate physical footprint representation for it based upon the schematic symbol’s catalog part number assignment (assuming that this part number assignment was already defined on the schematic representation).
If the appropriate footprint block symbol is found, the command grabs a copy and then prompts you for where you want to place it in the panel layout.
You pick the position. AutoCAD Electrical pops it in. Then it copies the schematic data over to this newly insert panel representation. This data includes a copy of the schematic symbol’s tag-ID attribute value.
In this way the link between the schematic representation and the physical layout representation is automatically established without the need to enter the same data a second time. The tag-ID value pulled from the schematic version and listed in the pick list is then pushed across to the P_TAG1 attribute on the panel footprint representation. Results in matching tag-IDs between the two representations… and therefore enables the bi-directional update between them when you make an edit to one or to the other.
Additional bonus… as you go along, AutoCAD Electrical tracks what schematic components have been inserted into the panel layout by placing an “x” in the first column of the display list above.
That’s it for this posting. Much more to come in “Part 3″.
Tutorial: Smart Panel Layout – Part 1 can be accessed here.
Tutorial – Basics of ‘Smart’ Panel Layout (Part 1) – AutoCAD Electrical
Overview of how AutoCAD Electrical can link control schematics to the panel layouts
Autodesk’s Dustin Clark hosted a webcast earlier this month that focused on AutoCAD Electrical’s ‘smart’ panel layout feature. I helped put the demo together and was responsible for real-time Q & A support while Dustin was “on stage”.
This posting is a brief summary of what Dustin covered in the first part of the hour-long webcast. It might serve as a simple overview / tutorial of this AutoCAD Electrical feature.
Here we go…
What is meant by the panel layout drawings being “smart”? …
Answer: …the layouts have a “smart” relationship with their control schematic counter-parts.
Consider this: The panel layout drawings are probably just one part of your overall electrical controls drawing package. The other very key part of the package is the electrical controls “schematic” drawings.
The electrical schematic drawings in your design define the interconnected wiring between control devices such as relays, pilot lights, switches, motor starters, I/O modules, and such. They might be drawn in a “ladder” format as shown here, or sideways ladders, or even drawn in more of a point-to-point interconnection style.
These schematics are actually quite “smart” all by themselves. They can have automatically generated tag-IDs, child contact cross-referencing, automatic wire number assignments, various BOM reports, and on and on.
But, when panel layout drawings and associated schematics are combined in a single AutoCAD Electrical project, then the panel layouts get a big “Project IQ” boost from the presence of their schematics.
The panel layouts and the electrical controls schematics are tied very closely together. Now, in the image above we have portions of two drawings: an electrical schematic on the left and a panel door layout on the right.
Electrical components shown on the schematics will often have physical representations on the panel layouts. Here we see where three pilot lights in the schematics on the left show up on the panel door layout drawing on the right. The left side shows the “schematic” representations of each pilot light device. The right side shows the physical representation of each pilot light positioned in the “layout” drawing.
“Smart” means that
1.If the schematics exists while the panel layouts are being constructed, then physical representations can be quickly inserted into the layout drawings by just picked from a “schematic component list”. Existing labels and such carried on the picked schematic representation automatically transfers over to the physical representations in the layout.
2.After the layout has been created, an edit or change to a component on one drawing type can auto-update the same component representations on the other drawing type. For example, changing the text label on a pushbutton on the schematic can automatically update the label shown on the physical representation of that pushbutton found on the panel layout.
Let’s edit one of the schematic symbols and see if it is smart enough to update the panel layout.
We right-click on the “SAFETY OKAY” pilot light in the schematic (above screenshot) and select “Edit Component”.
Which then displays the AutoCAD Electrical “Insert/Edit Component” dialog above. Let’s change the 2nd line of the description from “OKAY” to “ENABLED”. Now we hit OK to exit the dialog.
The description change to the pilot light representation on the schematic finds its way “smartly” to its physical representation on the door layout. The panel layout drawing auto-updates to match the schematic change. (Actually there are two footprints in this example that update… the pilot light representation and the nameplate representation around it… both update but only the nameplate has “visible” attributes).
Let’s try that again. But this time let’s change the schematic’s catalog part number assignment.
We again right-click on the schematic pilot-light symbol to bring up the “Edit Component” dialog. Look at the current catalog assignment… it is a 30.5mm, 120VAC transformer type with a red plastic lens.
Just for fun, let’s change the part number assignment on the schematic symbol to that of a miniature red pilot light and see what happens to our “smart” panel layout.
We flip the catalog lookup dialog from TYPE “30.5mm” to “22.5mm”…
… and this brings up the catalog selections (screenshot above) for 120VAC XFMR red pilot lights that are type 22.5mm diameter. We make our selection, hit OK. What happens??
And there it is… the “smart” panel layout drawing automatically updated based upon the schematic symbol’s part number change. Notice that the footprint representation of the 22.5mm series pilot light has popped in and its physical size is smaller than the standard 30.5mm units around it.
Pretty cool. But there are a few clean-up issues the may need attention: 1) the 22.5mm series footprint pulled from the default AutoCAD Electrical library has a prefix “RE” instead of the original “R” for “red”. You can use any attribute editor tool (DDATTE, EATTEDIT, etc.) to flip this back to just an “R”. 2) The tag-ID attribute value LT409 comes in as “visible” when the new footprint swaps in. You can use one of AutoCAD Electrical’s schematic attribute tools to re-hide this attribute value.
More to come
There is much more to discuss. Will put together a “Smart Panel Layout – Part 2″ posting soon.
Webcast replay to be available soon…
Look for the full webcast to be posted soon here.
My message to my daughter upon her marriage today
Late this afternoon I gave away my only daughter in marriage. It was hard walking her down the asile. And she was so beautiful.
And it was even harder at the wedding reception, preparing for the final father-daughter dance. Here’s what I said to my daughter as I asked her for this last dance.
Nate.
11-June-2010
Rachel, you were my Special Angel, a nickname I attached to you when you were just a little girl.
You were the one who would spend hours with me in the evenings, quietly reading your arm-load of books, camped under my work table as I labored-away on my computer. More than once you would fall asleep under that table, amongst the scattered books. I would have to gather you up to carry you to bed.
You were special.
You were the one who would make me promise… PROMISE… to wake you up before I would leave the house on the many Monday mornings at 5am to catch the first flight out. In the early morning darkness I would tap on your door and quietly call out your name. Five minutes later you would come padding down… doll and blanket in tow… and silently watch me finish my breakfast. Then, as I picked up my bag and headed out the back door, you would move to the front door. And as I backed the car out of the driveway, I would spy my Special Angel, illuminated by the porch light, standing there inside the glass front door. I would blink my headlights… you would raise your hand… and I would slowly drive away for yet another week of out-of-town work.
You were special.
How many thousands of times did we have bed-time prayers together? The routine was this: I would be working in my office on the computer. I would hear you brush your teeth. Next, the bathroom light switches off. A few moments later there is the gentle rustling of blankets and such as you get into bed and arrange your pillows and dolls. And finally, there’s the sound of the bedroom light switching off. All is now quiet. Then I hear a little voice calling out for me… “Dad… I’m ready”. That was my signal. I would pause from my work and climb the stairs to your room. In the darkness, I would kneel down beside your bed and we’d have our prayer time together.
But as you grew up and moved into your later teen years, you sorta outgrew bed-time prayers thing with your dad. High-school, busy-ness, activities… growing from a little girl into a young woman.
But there was to be one more time… and of the thousands of times we had bed-time prayer together as you were growing up, this very last one is the one that is burned into my memory:
You were moving away. You were all packed up. You were leaving home the next morning to start college – hundreds of miles away. I think we both sensed that a chapter in our lives was ending.
That last night… before you were to leave home… as I worked at my computer, I heard you brushing your teeth. The bathroom light snaps off. The rustling sounds of you getting into bed. The bedroom light turning off. Quiet. I sit there at my computer. Thoughts of gratitude and thankfulness to God for bringing us to the end of this life’s chapter, but mixed in with a bit of sadness. I think back to the years of our bed-time prayers together, and how that routine thing now seemed so much more precious in the years since it had ended.
But there was to be this one last time. From the quietness, I hear your voice call out, just as it did some years before as a younger, littler girl… “Dad. I’m ready.” I climbed the stairs to your room, I’m glad it’s dark because tears are filling my eyes. That final bed-time prayer with my special angel, me weeping in the darkness… I will never forget.
Finally, I believe God’s hand has touched your life.
You were probably six or seven. We guys were all at the softball field for a game in our men’s church league. It was a hot, muggy summer evening. The men were loosening up… stretching, playing catch, taking practice swings.
As you stand there watching, I suddenly feel compelled to take three steps forward to stand between you and a player taking cuts with a baseball bat some distance away. Step… step… and on the third one, as I step in front of you, the bat slips from his grip and shoots through the air, barrel first. It strikes me in the thigh on that third step. We all jump back, everybody looks.
I think we probably went on to lose that game. And what everybody thought that evening was that our record was not getting any better and, oh yeah, Nate will probably wake up tomorrow with a nice-sized bruise on his thigh. But nobody saw what really happened that evening, and I didn’t say anything. I filed this away in my heart. Because I believed that on that hot, muggy summer evening, that I witnessed the Hand of God in and on your life… the barrel-end of that flying bat was thigh-high on me, but would have been forehead high on you.
God is good. And you are special. God’s hand is on you and Eric.
So, here we are this evening. I gave you away a couple hours ago. But will you dance with your dad this one last time?
============
Update: pics thanks to Remi Bowers, Sandy Felzer
Tutorial- Customizing ‘Type 4′ contact pin list assignments – AutoCAD Electrical
Smart “type 4″ contact pin assignment extends capabilities beyond just “normally open / normally closed” contact states.
Note: Autodesk’s Nathan Eliason hosted a webcast last month that focused on AutoCAD Electrical’s contact and pin assignment tracking features. I helped put the demo together and was responsible for the real-time Q & A support while Nathan was “on stage”.
This posting is a brief summary of what Nathan demonstrated at the very end of the webcast. It might serve as a simple tutorial of setting up an enhanced version of the “pin list” feature in AutoCAD Electrical.
Related tutorials: Tutorial – AutoCAD Electrical and Contact Pin Assignments, Off-beat Uses of Toggle NO/NC Command, Tutorial – Setting Up New Device “Pin List”
Introduction
In the previous tutorial we looked at a hypothetical parent safety-relay component that had two different types of “normally open” contacts – it had some N.O. contacts meant to switch ”power” and another type meant only for auxiliary control use. Both types were marked “normally open” but mixing them up was not really an option. We wouldn’t want to accidentally assign an aux N.O. contact for use as a N.O. power contact. It might work one time, but that’s probably about it.
To help work around this issue, the previous tutorial showed how we could add “comments” to the encoded “pin list” string for the parent component. These comments then show up in the “Pins in Use” dialog and help guide us in making an informed contact assignment.
Here are a few screen-shots extracted from that tutorial…
Here’s how the dialog might look without the comments. The first three N.O. references are “power” contacts and the “13/14″ one is an auxiliary N.O. control contact. All four are N.O. contacts tied to the parent device “SC429″, but it’s not apparent from the list of available N.O. contacts which are “power” and which are “control”. You could guess, but it would be just that… a guess.
And here is how the previous tutorial explained how to add in flagged “comments” into the pin list string. Here the first three pairs of pins are marked with a “PWR” comment…
… so that the dialog gives a bit clearer explanation to the user to make an informed choice:
A Second Way – Using the “Type 4 – Other” contact type
This method is a bit more complex but yields an automatic assignment of the correct pair of pin numbers for a power versus aux control N.O. contact insertion. It was touched on in a posting a couple years ago here, but is dusted off and re-presented below.
It is based upon two things: 1) adjusting the “power” N.O. contact references in the encoded pin list string to use “type 4 – other” instead of “type 1 N.O.” and 2) creating a separate N.O. contact symbol to be used for “power only”.
For encoding our “power” N.O. contacts into the pin list, we decide to create a new “type 4″ pin list type called “4P1″. Our code must start with the digit “4″. After that, it’s totally up to us.
So, we go back into the Pin List Database Editor tool and edit the ACME record we added in the previous tutorial. We change the “type” of the three N.O. power contacts from “1” to our special “4P1”. Hit the Save/Exit button.
Now, our final step is to create a new N.O. contact library symbol to be used only for “power”.
We’ll just make a copy of the existing N.O. motor starter / contactor library symbol “HMS21.dwg”. We’ll name the new version HMS21_4P1.dwg. Add a non-visible attribute definition PINLIST_TYPE and give it a default value of “4P1”.
Just for clarity we’ll flip the two vertical lines to Polylines and give them a wider “width” value so it will be easy to tell the difference between a “power” N.O. contact and a normal N.O. contact.
Testing !
Okay, let’s test our new full-automatic assignment mode and see if it works. Insert the motor starter / contactor coil as outlined in the previous tutorial. Make ACME catalog assignment as before.
BUT, before exiting the dialog, it is beneficial to make one small adjustment. Hit the “NO/NC Setup” button…
Make this quick adjustment. Bump the “Maximum NO contact count” back up to a total of 4.
The reason it now comes in as a value of 1 instead of the previous value of 4 is that we changed three of the N.O. contacts from type “1” N.O. to special type “4P1”. AutoCAD Electrical does not know that these are still considered to be N.O. contacts… so we make this small adjustment.
If we skip this step, AutoCAD Electrical may pop up an unnecessary alert dialog when we try to insert a second N.O. contact, whether it is a power contact or a normal auxiliary contact.
Hit OK after bumping the count up to 4 N.O. for this parent coil. Hit OK to exit totally out of the Insert/Edit dialog.
Okay, now cross your fingers. Now we’re fully ready to test.
Insert a generic N.O. auxiliary contact and tie it to the Safety Contactor parent coil.
AutoCAD Electrical finds the first (i.e. “only”) N.O. contact in the coil’s catalog pin list and defaults to pin pair 13 and 14.
If we hit the “List” button on the dialog, we can see that AutoCAD Electrical is displaying only the one set of N.O. pins as an appropriate pick.
This is good.
Now let’s try an instance of our special “power” version of a N.O. contact. We insert an instance of our modified “Power” N.O. symbol and tie it to the Safety Contactor parent coil.
AutoCAD Electrical notices that this symbol has a non-visible attribute PINLIST_TYPE on it, and this attribute carries a value of “4P1”. AutoCAD Electrical checks the parent coils pin list data and finds there are three available child contact pin pairs marked with this same “4P1” code. It takes the first instance and defaults to pins 1 and 2 for this power contact.
If we hit the “List” button on the dialog, we can see that AutoCAD Electrical is displaying only these three special contact pin pairs.
There it is. We’ve customized the behavior of this feature just a bit when dealing with our safety contactor symbols.
Pretty cool.
Webcast posting for rerun viewing…
This webcast should be available at this link, or go to the main site here:
http://resources.autodesk.com/msd/AutoCAD_Electrical/Webcasts














































































































