In the last two challenges, you have tried to minimize repetitive tasks. If you missed our Work Better with AutoCAD challenges, you can read and join the discussions here:
This is the last challenge to minimize your repetitive tasks. You will do some customization.
Don’t runaway just yet. Customization doesn’t have to be a complex programming task. You will explore simple customization that you can do. It’s quite easy to do, even for novice user.
AutoCAD is very easy to customize. You can customize shortcuts to reduce key strokes. You can create macro or script to run sequence of commands automatically. And certainly, you can create custom program to automate your tasks.
Let’s see what you can customize to work faster and extend your AutoCAD capabilities.
Command alias is the shorter version to activate AutoCAD commands. To activate LINE, you only need to type L then enter. You can modify command aliases for your needs. The command you frequently use may not have a command alias yet. Or you probably use some command more than others.
My colleague changed command alias for COPY. He changed it from CO to CC. Because it will be faster to press C twice than pressing C then O!
If you are not familiar with modifying command alias, you can read Brian’s tutorial here. You can also use express tools as explained by Ellen Finkelstein here.
Please share with us, what is your custom alias. We might be able to learn from you.
Creating Command Macro and Scripts
If you perform a drawing process frequently, then you can try to automate it. You can write several lines of instructions to run. When you need to use it, you only need to run it once.
If you want to learn more in details, Paul Munford has awesome tutorials here:
- Learn AutoCAD script to automate plotting.
- How to automate AutoCAD with command macros.
- Paul also shares how to put macro in tool palettes: 11 killer macros for working with AutoCAD viewport.
You can find more samples here. Hai Le shows that even simple macro can be very helpful:
- Adjust dimension spacing automatically.
- Restore standard layers and styles after PURGE.
- Change UCS and change text layer.
I want to emphasize that customization doesn’t need to be complicated. Simple macro or scripts can be very very helpful! Do you have some cool macro/script to share with us?
Another customization that you can touch is CUI, Customize User Interface. Not everyone like command alias. You probably prefer to use toolbar or ribbon. To add custom commands in AutoCAD UI, you need to work with CUI. But CUI is not limited to toolbar and ribbon.
You can also:
- Customize tooltips and quick properties.
- Customize keyboard shortcut combination (it’s not the same with command alias).
- Double click action.
- Mouse click combination.
- Load LISP with CUI.
You need to know macro if you want to create custom AutoCAD command in CUI. If you don’t know about macro yet, it’s a good time to learn.
If you want to learn about customizing AutoCAD CUI, read our complete CUI tutorial here.
Macro and script are basically a series of AutoCAD native commands. If you want to do more complex programming, you need to go further.
AutoLISP is a very popular programming language among AutoCAD users. It’s more advanced than script and macro. While macro and script only execute a series of command, you can make more complex programming with AutoLISP. You can ask for user input, create a formula, using conditional statement and more. A program can be very complex, but also even a simple LISP program can be very helpful.
For example, this simple LISP program will create text on annotation layer, regardless what layer is current. You don’t have to create layer, change layer properties, and switch it to current. Just activate the command then enter your text.
AutoLISP takes some time to learn. Especially if you don’t have experience in programming. However, it can give great benefits to you.
If you want to learn about AutoLISP, you can check these resources:
- AfraLISP, the most popular resource to learn LISP.
- AutoLISP tutorial on Jeffery P Sanders website.
- Basic LISP tutorial on CADnotes.
AutoLISP is a programming language built into AutoCAD. The other option that you can have is using .NET. They are two different programming language. While AutoLISP is native AutoCAD programming, .NET is using Microsoft Framework. I’m not really familiar with .NET. Many other software also use Microsoft .NET framework, so if you need AutoCAD to “talk” with other software like Excel, .NET is probably the better way to go.
If you want to learn about .NET, there are not many resources available yet. Not as many as AutoLISP. One resource that I can recommend is this my first AutoCAD plug-in training from Autodesk.
Find available plug-ins and program on internet
Do you think creating your own custom program is overwhelming? If you don’t want to learn programming, you can still extend AutoCAD functionality. There are many available plugins or LISP you can get on internet.
The first place that I can recommend is Autodesk Exchange Apps. You can find plugins for many Autodesk products there. Many of them are free, but the rest of the plugins need to be purchased. Make sure you try the plugins before you purchase it!
There are many other resources that provide free LISP. Lee Mac provides many useful LISP on his website for free.
As usual, feel free to share if you know other resources to download/purchase plugins or LISP program.
Now let’s discuss this challenge
Many people don’t want to touch customization because they think it’s difficult. Customization is not limited to complex programming. There are many simple things that you can do to optimize your workflow.
Now let’s discuss about customization.
Do you use AutoCAD out of the box, or do you customize it?
If you use it out of the box, do you think you need to customize it? What interest you the most?
If you customize your AutoCAD, what customization you have? Any learning resource you can recommend. Any download resource that you recommend?
How much time do you think you can save by customizing AutoCAD?
You can still win the prizes
You can still win the prizes by completing all the challenges. The winners will be chosen after all the challenges are given.
Hi Guys, I like to create new commands using macros and lisps then add them to tool palettes and the QAT for quick access. I use the layer states then write macros to activate them for setting up the backgrounds for different MEP disciplines. I also change a few command aliases.
Hi, I’ve changed a few aliases in my acad.pgp. I use N for pan as I have a macro that uses P for zoom previous. I don’t use the keyboard for circles so I changed COPY to C.
That’s neat Cary!
I used to use CC for the copy command. I don’t want to change the default alias because sometimes another user uses my computer.
CC is almost as fast as C, because I only need to press it twice!
IMO, customizing AutoCAD using the gamut of available tools is the key to becoming more productive. Whether it is simply creating a new ribbon tab to organize the most frequently used commands, creating a custom command using AutoLISP or developing an Enterprise level menu for an entire work group.. Customizing the environment to suit the tasks at hand will make life easier and allow you to get things done in a more timely way.
I really have enjoyed these challenges so far! Very informative! Thanks to all!
Here’s a small script file that I run to close down drawings.
Hope that it helps someone — somewhere.
;;; AUDITS, FIXES ANY FOUND ERRORS, PURGES, SAVES, AND CLOSES DRAWING ;;;
;;; end of script ;;;
I love customization! But I don’t know how to work with lisp, so I do all my buttons customizations with diesel language (macros).
*^C^C_erase;SINGLE; – for erasing object without pressing enter
*^C^C_move;\;0,0;@.03<315; – for moving furnitures from the walls
*^C^C-BHATCH;\; – for doing hatches without dialog box (when a pattern is already defined)
Snapbase;\;^C^C-Bhatch;Properties;user;0;0.20;y;\;ch;l;;p;la;aq-piso01;; – for creating a pattern of floor with tile .20 x .20 – the first click is to define the origin of the pattern, the second click is for to choose the area and the pattern goes to proper layer automatically.
^C^C_Dimlinear;\\\-ch;last;;p;la;Aq-cota;;^c^c_ – this creates a linear dimension already on its own layer
_zoom;_e;'zoom;.85x;-la;m;0;;^C^C-Purge;a;;n;^C^C_save;;y;_close; – this one is about zoom extent, set the current layer to 0, purge the drawing, save and exit in just one click.
And so on!
I only use some commands in the keyboard, like copy(c), move(m), line(l), erase(e), sc(scale), zoom(z), offset(o), fillet(f), rotate(ro). The others I access through the buttons.
My right-click of the mouse is set for Turn on time-sensitive right-click 250 milliseconds. So I can use the two mode: repeat last command and shortcut menu.
I use tool palettes that are saved by the types of drawings I am doing. Each includes annotation, linework w/ layer controls, blocks, and LISP routines to speed up my work.
I learned AutoCAD with key-in commands and I find it much quicker to type in a single or double letter combination to activate commands than using menus or the ribbon. I use Express Tools AliasEdit (or you can edit the .pgp file with Notepad) to add or change the keyboard shortcuts of the commands I use the most. C for Copy, SS for SelectSimilar, AS for AddSelected. Most of my LISP routines are simple “one liners” to run two part commands – those that require a second or third selection such as Lengthen/Total:
(defun c:ltt ()
(setq LEN (getdist “\nEnter Length: “)) ; lengthen by total length
(command “lengthen” “t” LEN)
and setting the annotation scale:
(defun c:c10 ()
(command “cannoscale” “1:10”) (princ)) ;set annotation scale to 1:10
(defun c:c2 ()
(setvar “clayer” “Structure”) ;set layer to Structure
(command “circle” “2p”)
A co-worker sets her shortcuts so they are all done with the left hand, but I find them easier to remember if they start with the first letter of the command.
One other thing I do is change my Function keys to the transparent commands of END, MID, CEN, ORTHO, PERP, M2P, QUA, NEA for use when inside a command. This is done in the CUI under Keyboard Shortcuts/Shortcut Keys; Snap, Endpoint; Snap, Center, etc.
I don’t use macros because I get better results with LISP.
Congratulations on a great set of articles to work better with AutoCAD! I’ve enjoyed reading them.
My set up is slightly customized we mainly use AutoCAD LT as well as a couple seats of Full and my setup is the same on both iwo 2D.
I use the ribbons so I’ve modified the 2D home tab pretty heavily to speed things up:
– I changed Draw panel around the big one is changing the header of the drop down circle button to Tan Tan Tan because all the other circle commands I run from the key board and there’s no ability to pick that one from the circle command.
– I’ve modified the Annotation Panel to split all the multileader stuff into separate buttons which adds an extra column
– Modified the Modify panel because the commands above the drop down I use the keyboard to activate
– Removed the Clipboard, and Block panels
– Added two panels that have buttons for 10 custom macros for repetitive tasks
– Reorganized the layout – Draw,modify,annotation,layer,properties,custom,custom,groups,utility
I’ve change a bit of other stuff in the CUI the ones that come to mind that I know are different are:
– Switched paste as block to not required the shift key as I used it more than paste as not a block
– Changed “copy” to Ctrl+C”
– Ctrl+D is draw order
– Ctrl+R for 3D rotate
– Ctrl+B for break at point
– Ctrl+Q for Quick select
– There’s probably some other but they were changed that long ago I probably don’t view them as customs.
Personally I don’t think I could go back to stock AutoCAD there’s just so much stuff you can personalize to make your life easier, reduce button clicks (especially with tabs), and reduce overly repetitive tasks especially things like changing layer visibilities for tasks. Thing is I think most people see customization as LISP’s or .NET and they don’t want to bother with it but there are some very simple tweaks you can do through the CUI manager and it’s very simple to do. The great thing about customizing AutoCAD is you only have to do it once and you can migrate those customizations between installations.
One thing for the more senior drafties in here that don’t do it is sharing some of your customizations with your co-workers. The 10 macro’s I run I’ve spread through the office through the CUI export/import ability. The best thing I found about doing that is you get a little feedback and it makes the tools better and increases productivity.
One thing I forgot to mention that I’ve done as well which isn’t constrained to AutoCAD is that I use a Logitech Performance MX mouse, coupled with the Logitech Setpoint software I’ve modified the button commands so I can control polar on/off, undo, and pan from the three buttons located directly above my thumb.
I have been able to set up a lot of macros using AutoLISP. I was able to learn a lot from an instructor from ACAD University. I couldn’t attend his class, but, I did read his book.
AutoCAD: Secrets Every User Should Know by Dan Abbott.
It was set up for CAD 2007, but I am still finding things I can use in it. I set up my own acaddoc.lsp file in the support area of AutoCAD. I have it load:
(setvar “DIMASSOC” 2)
(command “edgemode” “1”)
(command “taskbar” “0”)
Thiks will load everythime I start AutoCAD. So these commands are loaded with every drawing.
(defun c:scott ()
(setvar “cmdecho” 0)
(command “osmode” 165)
(command “cursorsize” 35)
(command “ortho” “on”)
(command “taskbar” 0)
(command “dimassoc” 2)
(command “viewres” “” 1000)
(command “facetres” 5)
(command “expert” 1)
);;;This one comes in handy when I open someone else’s drawing and have to reset variables.
FZ; This one is Fillet with a radius of zero
ZZ; on the other hand is loaded with commands;
(defun c:zz ()
(command “.zoom” “e” “.qsave”)
(princ “\n zz.lsp is loaded. Type \”ZZ\” to zoom and save”)
(defun c:za ()
(command “.zoom” “a” “.qsave”)
(defun c:expl ()
(defun c:zp ()
(command “.zoom” “e” “.qsave”)
(command “.zoom” “p”)
(defun c:rs ()
(command “.regen” “.qsave”)
(defun c:dbl ()
(defun c:dsp ()
(defun c:top ()
(command “-view” “o” “t”);;;view from Top
(defun c:fr ()
(command “-view” “o” “f”);;;view from Front
(defun c:back ()
(command “-view” “o” “ba”);;;view from back
(defun c:bottom ()
(command “-view” “o” “b”);;;view from bottom
(defun c:left ()
(command “-view” “o” “l”);;;view from Left side
(defun c:right ()
(command “-view” “o” “r”);;;view from Right side
(defun c:rv ()
(princ “\n revcloud.lsp is loaded. Type \”RV\” to run.”)
(defun c:sr ()
(command “_vscurrent” “r”);;;current view Realistic
(defun c:s3 ()
(command “_vscurrent” “3”);;;current view 3D wireframe
(defun c:s2 ()
(command “_vscurrent” “2”);;;current view 2D wireframe
(defun c:s3h ()
(command “_vscurrent” “h”);;;current view 3D hidden
(defun c:dml ()
(setvar “cmdecho” 0)
(setq SET-OLD-LAYER (getvar “clayer”))
(command “-layer” “s” “Dims” “”)
(Command “ORTHO” “OFF”)
(while (eq (logand 1 (getvar ‘CMDACTIVE)) 1) (command PAUSE))
(Command “ORTHO” “ON”)
(setvar “clayer” SET-OLD-LAYER)
enddwg; ah, one of the fun ones;
(DEFUN C:enddwg ()
(COMMAND “.mview” “l” “off” “all” “”) ;UNLOCK VIEW PORTS
(COMMAND “-layer” “off” “DEFPOINTS” “”) ;TURN OFF VPORT LAYER
(COMMAND “.QSAVE”) ;SAVE DRAWING
(COMMAND “.CLOSE”) ;CLOSE DRAWING
) ;end defun
(princ “\n enddwg.lsp is loaded. Type \”ENDDWG\” to run.”)
;;;If you change the “.mview” “L” (“off” to “on”) it will lock all viewports.
I hope some of these come in handy.
Thank you for sharing Scott!
Very interesting use of acaddoc.lsp!
Command Alias… R for Rectangle opposed to Redraw, who uses Redraw anymore?
I always add Mirror to the right-click “Edit” menu. Always seemed odd to me that move, rotate, scale, etc was there but not mirror. I love the right-click menu, the more I can keep my coffee cup in my left hand and not on the keyboard the better I am!
Actually… I already forget about REDRAW… :D