Tuesday, December 1, 2015

Catalog of Posts

I haven’t been that happy with the search feature on this blog lately. Several times in the past few weeks I have been asked for something that I knew I had already wrote about. After several searches, I finally had to resort to looking through ALL the posts until I found it.
Click the read more link to see the entire list.

Friday, March 6, 2015

Running Scripts on Multiple Files – AutoCAD Electrical

Several times now I have been asked how to “do something” to every drawing in the project. The last one to come across my desk was to freeze all layers on all drawings project wide. AutoCAD Electrical actually has some really good tools for running scripts. I find myself turning to it even for non Electrical needs quite often.

Here are some examples I have encountered recently:
Updating the company address, or copyright year, on all title blocks
Swapping title blocks on all drawings (Swap/Update Block)
Zoom Extents, set limits, and export PDF
Add company standards (layers, dim styles, ect) to all drawings
Freeze all layers

Pushing a Script Project Wide

This method involves a script file (.scr). A script file consists of only what you would type in the command line. Start Notepad and type everything command there as you would in the Command Line. For example to freeze all layers and then do zoom extents your script file would look like this.

To test a script file simply drag and drop the file into the drawing window. The script will run and you will quickly see if it runs properly. If you script is complex, consider adding notes. Any line started with a semi-colon is ignored by the script file. Add comments starting with a semi-colon to make future edits easier to understand.

And now to run this script on an entire project. Make the desired project active and then choose Utilities from the Project tab.

In this dialog, select ‘Run command script file’ and select the script file to run. After pressing OK the option for project wide is the default.

Pushing a Script On All Drawings in a Folder

This option is hidden under the Symbol Builder drop down menu. The command is Modify Symbol Library. This utility can be used to simply run an AutoCAD command or to run a script on all files in a folder.

The first thing the command asks for is a folder. After selecting the folder, the following dialog displays. I recommend creating a test folder with only a few drawings to prove out the script before running on a large number of files.
Check the Run AutoLISP box and enter a LISP command.

This dialog checks your LISP command for proper formatting. If something is wrong the following will display.

Any AutoCAD command can be run in LISP by simply starting with “command”. Remember all LISP lines are enclosed in parentheses ().

I entered the following to run my script file… (command "_.script" "C:\LayerLock.scr")
Press Start and sit back while AutoCAD Electrical does all the work.

Tuesday, January 27, 2015

Customizing The Marking Menu in AutoCAD Electrical

imageFirst we should discuss what the marking menu is and how it works. If you recently upgraded from 2012 or previous, you noticed the right click menu has changed into a circle of commands instead of the usual menu.

This menu can be used exactly like the previous one. By first right clicking and then left clicking the desired command. However once you know the location, or direction, of the commands, simply hold right click and drag in the general direction and the command in that direction loads.

imageDepending on your workflow, you may find that several of the options on the marking menu are not used that often. In my case I use Copy Wire Number far more than Bend Wire. In this example I will replace the Bend Wire command with Copy Wire Number.

For the most part, everything about the user interface is driven by the .cuix file. Modify this file by selecting CUI at the command line. There are may things that can be done here but we will focus on modifying the right click menu on this post. image

The marking menus are found under the heading “Shortcut Menus.” Expanding one of them shows the commands that would be shown on the marking menu when that menu was called for.

Not the number of menus… this isn’t as simple as changing one menu and your done. These menus are context sensitive. So there are several of each type.

For wires there are the following menus: Wires, Hot Wire menu only – Wires, and Hot Wire menu only - Wires with no gaps. So all three may need to change depending on the command.

Next we need to make sense of the order of the commands. The CUI editor shows them in list form. But the right click menu is a circle. I know we can simply swap out the one being replacing but its good to know the order. From the Electrical help I found the following.
So that translates into the following.
menu   image
On to making the command swap. I have found the command I wish to swap out…
And now to find the command I wish to replace it with. Simply type the name of the command into the command search bar of the CUI window.

Next drag the command from the search results up into the menu above.

After Removing the Bend Wire command I’m done with this menu. On to the other wire menu with Bend Wire.

             And finally test the menu.

Monday, January 12, 2015

Working with Multiple Level Terminals – AutoCAD Electrical

As multi-level terminals grow in popularity, we continue receiving questions about how to make them work in Electrical. Multi-level terminal blocks are unique in that they are represented by multiple schematic symbols but have a single BOM entry and panel footprint.

There is nothing special about the blocks or footprints. The real magic happens in the database. There are a number of extra fields in the default.cat.mdb that store the extra information needed for associating the different levels together.

The Properties

Lets first look at the properties. In this document I am using AutoCAD Electrical 2015. If you have 2014 or older, you will have a slightly different method for getting to these properties. I’ll post some screen grabs at the bottom of this post that show the older tools.

Simply edit a terminal and press Catalog Lookup. Then press the “Edit” button image and scroll all the way to the right.

Here you can see the additional properties dedicated to multi level terminals. Modifying them is quite easy. Simply enter the number of levels in the LEVELS cell and then click the image button to open the edit terminal property form. Enter all known information and press OK.
To add/modify internal jumpers between the levels, click on the INTERNALJUMPER cell then click the image button. Select the levels to jumper and then press the Assign Jumper button.

The Workflow for Associating Terminal Levels Between Symbols

imageThere are a number of ways to create the association between the terminals. In this short tutorial I will only show one. After the symbols have been placed, edit one of them. If multiple levels are present they will be listed in the Edit Terminal dialog.

If no additional levels are present, press Details >> button, and then Catalog Lookup and select a multi-level terminal block.

To create level associations press the Add/Modify button.

From the resulting dialog, select the terminal you wish to associate, then click the level to add it to, and finally press the Associate button.


After the level associations are created, the order of the levels can be modified by using the Move Up and Move Down buttons.

That’s pretty much it. If this was too confusing, or involved too much clicking, terminals can be associated using the right click menu as well. Simply right click, Associate Terminals, and then click the “other” terminal.

Placing/Updating the Terminal Strip will show the new associations.

Terminal Properties For AutoCAD Electrical 2014 and Previous Users

Edit the terminal properties by using the Terminal Properties Database Editor. Look at existing multi-level terminals and note the format needed for each field. (for example 2,2,2)

Monday, September 15, 2014

Uninstalling the Autodesk Design Suites

Over the weekend I sat down to write a post about setting default pin values. In the process I found I forgot to install all of the manufactures. So I ran through the setup to add them. <<Adding Missing manufactures>> However during the setup process my workstation blue screened. After that, I could no open Electrical, after a profile error, it would switch over to AutoCAD Mechanical for some reason. I uninstalled it but the uninstalled failed halfway through and it was then missing from my uninstall list. I could also no longer install. Half way through the installer it states something about the software already being installed and it rolls the installation back off. I decided to uninstall EVERYTHING 2015 so I could clean out ALL 2015 user folders and the registry. That brings me to the uninstaller. Rather than uninstall all 20+ pieces of software that come with the Product Design Suite there is a nifty uninstaller.Uninstall2


This tool is nice because it uninstall the software all at once and in the proper order. In the image to the right you can see Backburner and 3ds Max Populated Data are removed ahead of 3ds Max. Pretty cool.

After doing some cleaning using the following pages as references…
Clean uninstall of Inventor 2015
Clean install of AutoCAD Civil 3D 2015
I was able to properly reinstall the entire Product Design Suite again.

I also found these two links…
How to remove all Autodesk products from a Windows system

How to manually uninstall the product using Microsoft Fix it
I didn’t see this option until the full uninstall was in progress. This looks like a much better option. If this option works for you please comment below letting us know.

I could find no clean uninstall instructions for Electrical alone or the entire 2015 Product Design Suite.

So not the post I originally planned on but a post that I hope helps someone out there.

Monday, August 11, 2014

Adding a Category (Family Table) to the Catalog Database

This command is a little hidden. It’s under the Other Tools drop down off of the Project tab. image



In this post I’ll add a category named AT for my “test.” First we confirm that AT is missing from the category drop down. (Image on left)


The command first asks what database you wish to modify. Choose your current default_cat.mdb.

Type in the new Category code and its description. This will create the table as well as modify the _FAMILY_DESCRIPTION table.

image   image

And of course we need to verify that the new category is actually there…

Sunday, July 20, 2014

Linking the Schematic to the Drawing’s Sheet Number

Wouldn’t it be nice if changing the order of the sheets in the project didn’t screw up the ladders, components, and wire numbers? If your drawings follow a numbering scheme that is directly tied to the sheet number, it is time to update a few property settings.

What things are tied to sheet number in this type of numbering scheme? Well there’s the ladder rung numbers for one. Then we have the components tag finally the wire numbers.

Lets start out creating a new project. I’ll go over modifying an existing project at the end of this post.

The Ladder

imageBefore the ladder is placed, the style needs to be selected from the drawing’s properties.

From the Drawing Format tab, select Setup. This new dialog allows us to set ‘Sheet and numbers’. After choosing this setting, place the ladder, or ladders, on the sheet. Remember that the sheets number will be in front of each rung. So the starting rung number will be 00 or 01.

If no sheet number has been placed on the current sheet, the rung numbers will start with question makes. Add a sheet number to the drawing and watch the ladder update. Pretty sweet right? Wait until the components and wire numbers updates as well.

image  image
We can’t stop here. Because the rungs are actually named 00, 01, ect. So components and wire numbers will be missing the sheet numbers and that would lead to duplicates.

Note: If the drawing had a sheet number and it is blanked out, the rung numbers are given two zeros in place of the question marks.

The Components

To update this numbering style on the components, it’s back to the Drawing Properties. This time we are adding a %S between the %F (family) and %N (reference number). So the number is %F%S%N or Family, Sheet, Reference Number. All with no spaces or extra characters. Make sure these letters not in lowercase.
While we are here we can take care of the cross-reference style as well. Here we do not need the family but do need to add the sheet number (%S).

If the sheet number is blank, the component will have question marks in place of sheet numbers just like the ladder did. However unlike the ladder, the component tags do not automatically update after a sheet number change. To update the components tag, simply run the ‘Retag Components’ command.

image imageimageimage

If there are existing cross-references that should be updated as well, be sure to run the Component Cross-Reference command to update these cross-references to match the new style.

The Wire Numbers

And finally we have the Wire numbers. By now you should know where we are headed. Back to the Drawing Properties again. This time the Wire Numbers tab. Simply add the %S to the front of the Wire Number Format cell and we’re done.


Wire numbers are easy. If they are already placed, simply rerun the Wire Numbers imagecommand again and they update. Either way, run the Wire Numbers command.


With these settings the drawings can be placed in any order at any time. Simply update the sheet numbers manually, using the Title Block Update, or the Project Wide Update/Retag commands. Then rerun the ‘Retag Component’, ‘Component Cross-Reference’ and ‘Wire Number’ commands Project Wide to refresh the sheets to match the new numbers.

Updating an Existing Project to Reference Sheet Number

The component tags and wire numbers are easy. Simply follow the instructions above and then run the ‘Retag Component’, ‘Component Cross-imageReference’ and ‘Wire Number’ commands Project Wide to refresh existing components.

All of these can be run at the same time using the Project Wide Update/Retag command. But that’s a blog post for another day.


The big problem with changing an existing project to this new numbering style is the ladders. The %S%N is actually a different MLR (Master Ladder Reference) block that the ladders use. So changing the ladder style in the drawing properties will not update the existing ladders. I wrote a post on swapping MLR blocks here… Changing a Ladder Reference Style Project Wide