CADTutor: The best free help for AutoCAD on the web
Michael's Corner RSS Feed

Michael’s Corner

Michael BeallMichael's Corner is a monthly publication written by Michael E. Beall, Autodesk Authorized Author and peripatetic AutoCAD trainer. Michael travels all over the USA, bringing his fantastic experience and great understanding of AutoCAD to his clients. Michael's Corner brings together many of the tips, tricks and methods developed during these training sessions for the benefit of all users.

Michael's Corner provides something for every AutoCAD user. Every month, a number of articles cover a wide range of topics, suitable for users at all levels, including "The Basics" for those just starting out. Essentially, the aim of Michael's Corner is to help all AutoCAD users work smarter and faster.

This month…

October - One-derful!!!

It's a God-thing.

I had no idea that 14 years ago I would be given the opportunity to make an impact on the professional lives of so many. Only God knew what was ahead, and hopefully, the contributions I have made through Michael's Corner have equipped many of you to be more productive and a bit more savvy using AutoCAD. And apart from all the AutoCAD bashing that is going on, I'm sure it has a long life ahead.

So, in an effort to keep the AutoCAD fires burning, here's what I have for my final installment…

…A reminder on how to customize your hot keys
…Three Power Tools — one for Zoom, one for editing, and one for Layers
…Two Odd Spots — one for Layers and one for Hatching
…Buried text treasure
…And how to Search 14 years of the Archives

As for what's ahead for me, I will continue to present a variety of AutoCAD sessions — Fundamentals, Intermediate, Customizing, Updates, and 2D & 3D. I will also keep training CAP Designer, 20-20 Worksheet, Visual Impression (those three from 20-20 Technologies, Inc.), and some Revit Fundamentals. Next year I'm looking forward to being very involved in training CET (from Configura, Inc.) when Herman Miller joins the growing number of manufacturers embracing this software that is being touted as the ‘Future of Space Planning’. Personally, I'm looking forward to spending a bit more time with Donna, my lovely bride of 30 years. When this posts, we'll probably be within days of going on our 30th Anniversary vacation to the Tanque Verde Ranch in Tucson; Ee-Hah! We had such a good time when we went for our 20th, we figured we'd do it again!

Ah, and I'm hoping to have The AutoCAD Workbench, Final Edition out before snow flies.

And with that, Mike drop! …so to speak.

The LORD bless you and keep you;
The LORD make His face shine upon you,
And be gracious to you;
The LORD lift up His countenance upon you,
And give you peace. Numbers 6:24-26

This month's articles

Change F1 to ESC
Smoother Zoom
Stretch with Extension
Lock Layers with a Crossing Window
Layer Columns & Hatch Background Color
Text Frame on Mtext

From the Vault

Originally published February 2016

LISP for Move Previous

It's been a while — four years ago, actually; MC February 2012 — since I tinkered with a one-line lisp. I usually put my customization on a tool palette or the Quick Access Toolbar, but I had a request recently to automate the Move command with the Previous option.

MOCORO: This is an opportunity, however, to remind folks of the buried treasure of the MOCORO [Move/Copy/Rotate] command under Express Tools (see Michael's Corner June 2004), just in case you didn't know that one was out there.

When you create a Lisp routine, you always want to confirm that there's no other command that you may unwittingly supersede in the execution of your new routine. To keep this one simple and quick, I'm going to use MM as the hotkey combination to launch the Move command with the Previous option.

How to Write and Save a One-Line Lisp

  1. Open Windows Notepad (not Word, it puts hidden characters in the header and footer).

  2. First, it's always a good idea to identify what your routine is doing by adding a comment line at the beginning. Comment lines have a semi-colon as the first character on the line. Add something similar to the following as the first two lines in your notepad file.

    ;   CADTUTOR 3/2016
    ;   MOVE command with the Previous option
  3. Add the following text as the next line. It's not case-sensitive and there is no preceding semi-colon:

    (DEFUN C:MM()(COMMAND "MOVE" "P" "")(PRINC))

    Here's how all that stuff breaks down:

    ( AutoCAD takes off if you hit the spacebar, so the first open parenthesis puts AutoCAD on ‘hold’.
    DEFUN DEfine FUNction. You're telling the Lisp routine what you're setting up.
    C: The Command: line. The text that comes after C: is what you type to ‘run’ the Lisp.
    ()( The ‘clutch’. Push it in ( change the gear ) let it out ( No options. Don't need to know.
    COMMAND For all one line Lisps, you need to let AutoCAD know you are using Commands.
    "MOVE" All commands and options go in quotes. Yes, you can put a space between them.
    "P" The option for Previous.
    "" Double-quotes; Lisp-speak for ‘Press Enter’. [Note: If you would like your routine to allow for the additional selection of objects after selecting the Previous selection set, leave out these double-quotes.]
    (PRINC) Locking the door on the way out. Suppresses that ‘nil’ you see in some routines.
    ) Resolve all the open parentheses.
  4. When you're finished adding your one-liners (you can have as many as you want, I would recommend comment lines between them, though), click FileSave, then navigate to AutoCAD's ..\Support folder.

  5. Important: You must enter the file extension of .LSP after the filename, not Notepad's .TXT. I'll name this one CT316_MPREVIOUS.LSP.

As I mentioned, your .LSP file can contain as many one-liners as you want. I simply recommend you put comment lines in between each routine so it doesn't look so cryptic when you review it later.

How to Quickly Run a One-Line Lisp

  1. Launch AutoCAD, then open ‘My Computer’ (Windows Explorer) with Windows key + E.

  2. Navigate to where you saved your .LSP, then drag and drop it into the AutoCAD drawing window.

    Loading a LISP with drag and drop

    You will see something like the following response on the command line:

    Command: (LOAD "C:/Program Files/Autodesk/AutoCAD 2016/ Support/CT316_MPREVIOUS.LSP") C:MM

  3. In the drawing, Move or Rotate a few things.

  4. To run your routine, enter MM and you will be prompted to “Specify base point”! That's all there is to it!

Launching Your LSP from the Startup Suite

Load Application from the RibbonIf you have a .LSP file containing routines that you want to have available whenever you open AutoCAD, add that file to the Startup Suite. On the Manage tabApplications panel you will find Load Application. In the Load/Unload Application dialog box, you will find the golden key: The Startup Suite.

How to Add Your .LSP to the Startup Suite

  1. Click Load Application [Manage tabApplications panel].

  2. Launch startup suiteClick the Startup Suite suitcase at the bottom (or Contents) to open the Startup Suite dialog box.

    Startup Suite dialog box

  3. At the bottom of the Startup Suite dialog box, click Add, then navigate to the .LSP files in the ..\Support folder (or wherever you saved that file).

  4. Select your .LSP file(s), then click Open to return to the Startup Suite dialog where you will see the file(s) listed.

  5. Click Close, then Close out of the Load Application dialog box.

  6. To make them work, you will need to close and re-launch AutoCAD.

Those are just, plain fun. Like a good book or a new favorite restaurant or whatever brings a smile to your day.

Top of page

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence