-
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.
-
Comparing project defaults to all drawings at once
January 22, 2007 10:18 PMby Nate HoltThis question came up a short time ago... AcadE has a tool to compare a given drawing's settings with the project defaults and display the differences. But can all of the differences in all of the project's drawings be displayed, perhaps in a spreadsheet format?
Try this utility
created with calls into the AcadE API.
1. Make target projet the "active" project.
2. Type APPLOAD at your command line prompt and browse to the utility (download attached file).
3. Type project_settings_compare [Enter].
4. Start Excel and reference the ".csv" file created by step 3 above.
Update: Oops, the file I uploaded was not quite right. I made some last minute changes and failed to adequately test. Please download a fresh copy. Sorry! - Nate.
-
Incrementing Line References - customizing the "user" symbol
January 12, 2007 01:02 AMby Nate HoltYou select this mode from the drawing properties.

As shipped in the product, the user line reference symbol pops in as a hexagon with visible sheet number and line reference number attributes.
Don't like it? Let's change it.

Altering the appearance of the line reference symbol
The process is a bit convoluted, but do-able. Here's how to proceed:
1. Open up the "user" line reference symbol wd_mlrhx.dwg (or wd_mlrvx.dwg for line references along a sideways ladder). This symbol should be in your symbol library folder (ex: the "jic125" library or the "iec2" library).

It consists to two normal-sized, visible attribute definitions, nine small ones that are marked invisible, and a graphical block insert. The graphical part of this user symbol, in this case a hexagon, needs to be a block insert with its origin in line vertically with the insertion point of the RUNGFIRST attribute definition. This block instance is defined and inserted right into this user symbol. This means that it ends up being a "nested" block instance once it is finally inserted into your drawing as the first line reference number for a ladder.
2. Now let's change the graphical appearance of our "user" line reference symbol, in other words, alter this block instance in our symbol. A good way to do this is with the AutoCAD REFEDIT command. Start the command and pick on the hexagon block instance and stretch and edit its shape. In this example we adjust the left-hand end and make it look like a fat arrow. Close the REFEDIT command when finished.

This nested block's default name is aw_mlr_user. After we modify it with REFEDIT, it's a good idea to rename this block to some other block name (ex: use the RENAME > BLOCK command within this library symbol drawing to change the name to something like "mlr_user").
Why do we have to use a nested block for this? This nested block is what gets copied down to the 2nd+ instances of a line reference on a ladder. The SHEET and RUNGFIRST attribute definitions provide templates for TEXT entities inserted on the 2nd+ instances. This means that the full line reference block insert is ONLY the single one at the top or beginning of each column of line reference numbers. The 2nd+ instances are copies of the nested block and "dumb" text entity copies of the SHEET and RUNGFIRST attributes.

To finish up, adjust text placement and such as you see fit. Note: for AcadE 2007 and prior, avoid LJT ATTDEFs for the sheet and line reference number - it may give odd results). You can also get rid of the "SHEET" attribute if your line reference representations are not going to show this sheet assignment.
3. Save your modified version of wd_mlrhx.dwg. Test. Don't forget to purge your drawing if you have the original version of the user line reference symbol in your active drawing.

-
How to pull the 10 "user" attributes on a wire number into the From/To report
January 10, 2007 01:01 AMby Nate HoltThis has come up a couple times. I think this method will more or less work.
If you'd like to give it a try, please follow these instructions (requires
AcadE 2007 or AcadE 2008 beta or above).
1. Make backup of c:\program files\autodesk\acade 200x\support\wirefrm2.lsp
and wirefrm2.dcl
2. Copy attached modified versions of both files here and here
into the above folder.
3. Add some values to wire number attributes W01USER and W02USER like "100m"
and "600Vmax". Run the Wire From/To report and allow the report to display
in the report dialog.
4. Select the "Change Report Format" and select USER1_1 and USER2_1 to
display in the report.
5. Select "User Post". Select option 5. Hit OK.
Now look at your report dialog. Scroll down and see if the wire number
attributes you added show up in the USER1_1 and USER2_1 columns. If so,
then you're good to go. All 10 attribute values are extracted and formated
into USER1_1 through USER10_1.
This is straight AutoLisp and calls into the AutoCAD Electrical API. Take a look at the bottom part of the wirefrm2.lsp file (you can view/edit with any straight ASCII text editor or the VisualLISP editor). Fun stuff...!
UPDATE: Here's the same idea for the "Wire Connection List" report. Lisp file is here. Just select the 3rd toggle when the "User Post" dialog pops up.
-
Terminal assignments based upon Cable core indices
January 5, 2007 10:52 PMby Nate HoltA customer asked about this recently... wanted to quickly make terminal numbers follow any connected cable marker's color position in the overall cable color/core list. For example, if a cable core/conductor marked "RED" ties to a terminal, and the cable's part number assignment indicates that the RED conductor is the 2nd one in the cable's conductor list, then the terminal is automatically marked with a "2" for the terminal number attribute.
Here's an example of the desired final state. Cable "-W1" is marked as ANIXTER type 2A-1408 with a core color list of BLK, RED, BLU, ORG, YEL, BRN, RED-BLK, and BLU-BLK.

The user wants to window the terminals, have AutoCAD Electrical follow the connected wires back to cable marker symbols, retrieve the cable part number assignment and color list, look for matches in this list, and then push the appropriate terminal number out to the terminal.
Again, the AutoCAD Electrical "API" comes into play. Here's a simple utility to make this happen. Just "appload" it and type CABLECORE_TERMNO [Enter] at your AutoCAD command line. Window and smile. Don't be afraid to enhance this utility. Fun stuff.