Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Ditch dialog boxes with the command-line form of commands

autocad-tips-command-line-form-commands-1Did you know that many commands have a variation that lets you execute them solely on the command line? This technique is great for creating script files and AutoLISP routines. For example, you can write a script file to plot your drawings.

The secret is to put a hyphen (-) before the command name. Here’s a list of some common commands that have command-line versions:

  • -ARRAY
  • -ATTACH
  • -BEDIT
  • -BHATCH
  • -BLOCK
  • -DIMSTYLE
  • -EXPORT
  • -GROUP
  • -HATCHEDIT
  • -IMAGE
  • -INSERT
  • -LAYER
  • -LINETYPE
  • -MTEXT
  • -OSNAP
  • -PURGE
  • -STYLE
  • -TEXT
  • -UNITS
  • -VIEW
  • -VISUALSTYLES
  • -VPORTS
  • -WBLOCK
  • -XREF

For example, here’s what you see when you type -layer on the command line:

Lots of options!

In some cases, the command-line form is a different command or you can use a system variable. For example, instead of using the PROPERTIES command, which opens the properties palette, you can use the CHPROP command. Or you could focus on a specific property with the -COLOR, -LAYER, CELTSCALE, or other command or system variable.

You can see how creating a script file for some of these commands would be useful for automating repetitive tasks. For example, you can create and change layers using the -LAYER command.

down-red-arrows

How do you use the command-line form of commands in your work? Leave a comment!

 

 

Ellen Finkelstein

9 comments to Ditch dialog boxes with the command-line form of commands

  • caduser

    I began with R12 DOS, so I would be lost without the command line. I use it for entering my own aliases, invoking scripts and many times just for general ACAD commands. It is faster to use the command line than two or three picks on the ribbon.

  • Mohiuddin

    command line is life line in autocad for true users. n active any commands by command line batter for eyes and neck more over any version of cad u can work without seeing tools.

  • Dustinlai

    Dear Sir/Madam

    would you like to help me to make a 2D drawing with built dimension
    This is for class work purpose,
    contact no. 92093284

    Thanks
    Dustin

  • Keith

    I too am an old Cadder who like to type
    AutoDesk has been pushed side menus, top menus, button and now ribbons
    They are all ok but keep the command line and ensure that all commands new and existing come with their command line equivalent and can be worked with out a dialogue interface.
    also refer to http://www.onlinecad.net/AU%20Course%20Docs/AU%202007/Become%20An%20AutoCAD%20Power%20User.pdf
    From one of their own, POWER USERS like command line

  • John Dickson (@NkosiEcosse)

    Having started with Rev 6 on Dos 5, the command line is not new to me. However I have succumbed a little and seem to now vary my usage of command line, tool bars, menus and ribbons depending on what I see first. If it is not visible within 2 seconds then it is command line.

  • Perry Pattiz

    Between the Acaddoc.lsp and acad.pgp files I have a multitude of shortcuts that I use daily from the command line. I also have programmed in most of the object snaps as shortcuts with the shift key when I want to force a specific object snap without turning the rest off. I use the ribbon and icons on occasion, but use the command line the most often.
    BTW, I have been using AutoCAD for 25 years and still get excited when I learn a new command or usage for an old one. Keep it coming!

  • Charu

    What is other way to get every command in tool and table form ,so that it will be easier to work ,no need to remember options and if required can be immediately verified from easily executable tabular (dialog block) commands

  • Hans Graveman

    Charu you can activate the screen menu in CUI

  • jonathan

    when i try to insert a block using “-i” command, i write this command “-i ” &NameBLock&” CoorX,Coory”. But it’s not working, how can i do? AutoCad recognize all information like a block name, how to do it? thank

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>