Michael'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.
We now have a new system where readers can subscribe (and unsubscribe) to the Michael's Corner mailing list. This is an automatic system which gives you complete control over your subscription. Most importantly, we promise never to share your email details with anyone else.
It's old news to many of you by now, but I'm still pretty excited about receiving the Autodesk University Speaker Award for Hands-On Labs. My seminar, ‘Click My Ride: Customizing Autodesk® AutoCAD® for How You Work’, received the highest feedback rating among all the labs at AU. With over 700 seminars and labs, the competition was pretty substantial, so this award—for me—is the top of the heap. So however you may want to look at it, I guess I'm out standing in my field.
To continue with that ‘Click My Ride’ theme, in this (now bi-monthly) column, I want to take a look at a couple automation tools, as well as some of the things that we go back and forth with in our daily AutoCAD activities.
…Running a script from the Quick Access Toolbar
…Useful routines for the ACADDOC.LSP file
…Layer column arrangement options
…The fundamental power of Layer Previous
Hope this finds you all well on your way to a productive and prosperous 2014, and keep up the good work!
Keeping track of the layer you need to be on is a daily struggle. Over the years we've seen how to set that up on the Tool Palette to automate the layer the Text or Dimension is going onto. But what if you just want to set your default layer to current, such as the Shell layer, or, in the case of many of my customers, A-FURN.
We'll add this to the Quick Access Toolbar, too, but first we have to break down the command we'll be adding.
The button we add can't launch the Layer Properties Manager; it has to launch the Command line version of that feature: -LA
To launch the old-timey version of many AutoCAD commands, you precede their alias with a hyphen. For the Layer command you get the following:
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/Transparency/
Of the first three options — Make/Set/New — Make will not only create the layer, but it will also set it to current AND, if the layer already exists, it will simply set that layer to be current. Basically, cake & eat it, too!
Launch the CUI, then expand Quick Access Toolbars, then Quick Access Toolbars 1 to display the current content of the QAT.
Just above the Command List, click the button for Create a New Command. You will then see ‘Commandx’ in the list.
Drag your new command into the Quick Access Toolbar list of commands.
Now click on the command in the list to display the Properties in the lower right area of the CUI.
Give it a Display ‘Name’, and a ‘Command Name’, then enter the following in the Macro line, where you put the layer name you want to be current:
Note: Many times, we will launch a command and only then discover that the layer needs to be changed. The leading apostrophe in the above macro will run the -LA command as a ‘nested’ routine; it won't cancel the current command, just put it on hold. Since the -LA command returns the option string after each requested setting, the final semi-colon completes the command.
Rather than making a new button top [See Michael's Corner April 2011 for that process], find an icon in the vast collection of existing AutoCAD buttons and click it to assign it to the blank command button.
You may also want to add a ‘Tooltip Title’ before clicking OK to complete your QAT addition.