[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Redefine Commands
Tip# 3409 By Victor Jammal On 26-Apr-2010
1
Rated By 1 users
Categories : CUI (Customize User Interface)
Software type : AutoCAD 2011
Rename File To : No Files to download.
To eliminate an "unknown command" error, enter "redefine" before entering your command.

Victor Jammal sends us a tip this week on working with undefined commands.

"Sometimes when you enter a command, you might be surprised to get this response: 'Unknown command.' For example:

Command: explode
Unknown command 'EXPLODE.' Press F1 for help.

Explode is a standard command in AutoCAD; it should be there. If you have checked the command and are entering it correctly, but you are still getting the error message, the command could be undefined. To solve this problem, enter the word 'redefine' at the Command line before entering your command. For example:

Command: redefine
Enter command name: Explode

Now enter in the command 'EXPLODE.'"
 
Notes from Cadalyst Tip Patrol:
Sometimes users will "turn off" a command using the Undefine command. One reason to do this might be to make sure a custom-made routine works when a routine has a command or variable that happens to have the same name as a standard AutoCAD command. It is also a great prank to play on fellow CAD users.

Even though a command is undefined, you can still use it; simply type the command with a dot in front of it. For example, if you undefined Explode, then you can use it by typing .explode on the Command line. (This is why you will often see dots preceding commands in a LISP routine; the writer of the code wanted to make sure the command works, even if somebody turned it off.) Also, command alias inputs will still work for undefined commands. In this example, typing EX on the Command line will still invoke the Explode command.
 

 

Average Rating:
1


User comments