The integration of the Windows operating system into AutoCAD® was monumental. Buttons made accessing tools much easier and dialog boxes improved flexibility. As the years have passed, AutoCAD has included more and more tools that make geometry easier to create and modify.
And yet, those of us who used R10 and earlier know of a few secrets still buried in the program that can be helpful tricks for anyone using AutoCAD today. Several of the command line tools we used with DOS and early Windows operating systems are still accessible but unknown to many users. Remember the command line? It is still a powerful access point that lets you do things that cannot be done in the more GUI-rich environment. And don’t worry if you weren’t using AutoCAD way back when. This article will cover several handy commands and system variables that will have you tapping into the power of the command line.
All of the following commands and system variables must be typed into the command line. The command may or may not open a dialog box. You might be wondering if there are new commands that supersede the typed ones. No. Although some are in the ribbon, many of the commands and system variables noted below offer different options or address fundamental user interface settings that the ribbon buttons do not. The typed tools are particularly useful when creating custom ribbon panels, scripts, recorded actions, and toolbars.
MAXSORT – AutoCAD will alphabetize the layers. It does so up to a certain number of layers. MAXSORT determines the quantity AutoCAD will alphabetize. When the quantity is exceeded, the remaining layers will be randomly located throughout the list. Type MAXSORT into the command line and enter the number of layers that need to be sorted. The layers will immediately be organized. MAXSORT is a computer-based system variable, therefore it applies to every drawing file.
ZOOMFACTOR – Using the mouse wheel to zoom lessens the number of mouse clicks and will improve your efficiency. The speed at which the wheel zooms in and out is determined by ZOOMFACTOR. Type ZOOMFACTOR into the command line and enter an integer between 3 and 100. Entering 100 will enable the fastest zoom effect.
MENUBAR – I prefer to utilize the new GUI (graphic user interface) of each release of AutoCAD. Using the new GUI keeps me up to date and able to use AutoCAD on any machine. It took quite a while to get used to the ribbon. After four years there are still commands—even with a lot of customization—that I cannot easily find. MENUBAR set to 1 lets you access many commands in a familiar way but, unlike the Classic workspace, the ribbon is visible and fully functional. The MENUBAR setting is saved in Workspaces.
EXPERT - EXPERT mode can save quite a bit of time but can also be dangerous. When EXPERT is set above 0, certain dialog boxes and questions do not appear. Unfortunately, this variable is drawing-based and must be invoked in each drawing. There are multiple ways to automate this function: LISP, a script, a recorded action, and a custom button. This article will not address the customization, but there are several Autodesk discussion group threads that can help. The settings, listed in Autodesk Exchange, are shown below.
RENAME – Sometimes entities need to be renamed. They do not need to be redefined, replaced, or relocated—just renamed. By invoking the RENAME command, you can edit the names of a variety of entity types. Once the entity type is selected, the specific instance is selected. Enter the new name in the bottom box and press the Rename To button.
SELECT/SELECT – There are many great ways to select objects. Quick Select is effective when a large quantity of objects with similar properties need to be selected. Narrowing the selection to a small group of objects can be cumbersome. By typing SELECT, enter, SELECT, enter, several selection tools are listed in the command line. All of the selection tools are available when you invoke modify commands, but if you need to change the properties of selected objects, SELECT is an effective command. Some of the options given in the SELECT command have been superseded in newer releases. Some of the most useful selection commands are as follows:
F (Fence) – Draw a polyline of sorts through the desired objects.
WP (Window Polygon) – Draw a polygon and all of the objects within the polygon are selected.
CP (Crossing Polyline) – Draw a polygon and all of the objects within or touched by the polygon are selected.
P (Previous) – Selects the objects that were previously selected.
L (Last) – Selects the last visible object that was created.
SI (Single) – Selects the first object or set of objects designated rather than prompting for more selections.
Point modification tools – There are three drawing-based system variables that change the size and shape of points, also known as nodes: PDMODE, PDSIZE, and DDPTYPE.
- PDMODE changes the shape of the points. There are several different shapes. The values associated with each shape, listed in Autodesk Exchange, are shown to the right.
- PDSIZE changes the size of the point. If a positive value is entered, the point size is absolute and will not change when you zoom in and out. If a negative value is entered, the size is relative so the point will become larger or smaller as you zoom in and out in the drawing.
- DDPTYPE opens a dialog box that allows both the size and shape to be edited at the same time. When editing the point size, you are given the choice to set the size as absolute or relative. The graphic representation of the shape options is very helpful. There are not as many options, though, as the PDMODE command.
CLASSICXREF and CLASSICIMAGE – The new external reference palette has many great features. Unfortunately there is one fundamental tool missing from the palette, but was included in the external drawing and image reference dialog boxes. Save Path is extremely useful when absolute pathing is utilized. Often, relative pathing is preferred, but absolute pathing is sometimes more effective. If referenced files are moved, absolute paths are lost. A quick way to get all of those re-pathed is to place the drawings in the same folder as the external references and images, open the drawings, and enter CLASSICXREF. When the external references are selected, the Xref Found At line will show the desired path. Pressing Save Path will change the saved path to the one listed as the found path. The drawings can be moved to their desired location and the correct path is saved.
Frame settings – The ribbon contains a tool to change the frame settings for underlay and image references. Sometimes, though, you need control of individual frame types. I will often want the image frames but not the wipeout frame to print. IMAGEFRAME, PDFFRAME, DGNFRAME, and DWFFRAME control each individual type of frame by entering three value types. Enter 0 to turn the frame off. When the frame is off, the object cannot be selected or modified. Enter 1 to turn the frame on and make it printable. Enter 2 to turn the frame on, but not plot. Wipeout frames can only be turned on or off by typing WIPEOUT, entering F for frames and typing ON or OFF to control the visibility.
Plotstyle table settings – As a specialty consultant, we work on several projects simultaneously and with several clients. Though our drawings are plotted using named plotstyles, many, but not all, members of the design team continue to use color-dependant plotsyles. Often, the drawing plotstyle type needs to be changed from color-dependent to named. There are two commands that make this conversion: CONVERTCTB and CONVERTPSTYLES.
CONVERTCTB converts the current color-dependent plotstyle table to a named plotstyle table. Beware—if you select a custom-named plotstyle table within this command, the table will be saved over. I prefer to keep the ACAD.CTB and ACAD.STB files generic and select those tables during this process.
Once the CONVERTCTB command is complete, CONVERTPSTYLES will actually convert the drawing from color-dependant plotstyles to named plotsyles. When the command is invoked, you will be asked which plotstyle table to assign. You can only assign tables that have color mapping tables. Color mapping tables are created using CFG, PCP, or PC2 files. Color mapping tables are used to map plotstyles when opening a pre-2000 drawing. Unless you have your CFG, PCP, or PC2 files from R14 or earlier you cannot create a named plotstyle with color mapping. ACAD.stb has color mapping. It is easiest to select ACAD.stb and assign the desired table in the Layers palette or the various plotting dialog boxes when choosing the plotstyle table during the conversion.
Once both of these commands are complete, the drawing is converted. Note that the conversion from named plotstyles to color-dependant plotstyles only requires that the CONVERTPSTYLES command is invoked.
- command – Many commands can be invoked in the command line by adding a dash (-) before the name. Though most of the options are available in the ribbon, the command line tool version may provide additional options and will be used to create custom commands. Two tools that contain additional options are –ARRAY and –PURGE.
-ARRAY – AutoCAD 2012 introduced a great array tool. It is dynamic and easy to manipulate. For certain tasks, though, I prefer the old array tool. By typing the dash before array, you will invoke the command line version. The objects in the array will not be connected, and the editing is not dynamic.
-PURGE – The purge dialog box is very comprehensive, though one option not provided is purging regapps. A registered application is the named group of extended data associated with objects. When the object is deleted, the registered application is no longer referenced by an object but remains in the drawing. Multiple unreferenced registered applications will dramatically slow the drawing performance. To delete the applications without asking about each application, type –PURGE into the command line, enter, R, enter, *, enter, N, enter. Depending on the quantity of regapps, you will see an immediate increase in performance.
As useful as the ribbon and dialog boxes are, for those of us that started using AutoCAD in R10 or earlier, there are command line tools that we cannot give up. Typed commands can be invoked on any computer regardless of the ribbon, palette, and toolbar customization and are sometimes simply faster than navigating the ribbon. Tools that are not often used do not belong on the Home ribbon tab and can be buried deep, making them difficult to find. Hopefully, this article exposed you to older tools that are still useful and allow you to be more efficient.
Lisa Bernacchi is a Theatre Consultant and the CAD Manager in Schuler Shook’s Chicago office. She has been working with AutoCAD since release 10 and is responsible for developing and maintaining theatre graphics standards. She can be reached at firstname.lastname@example.org.