About 6 years too late but...
Try enter a single period before the command name, i.e. ".CMD1".
Preceding a command name with a period (.) ensures that the built-in AutoCAD command is accessed, and not an application-defined command of the same name that has been defined to override the built-in command using UNDEFINE.
For example if you use the UNDEFINE command on the CIRCLE command, you can still access the command by preceding the command name with a period, i.e. ".CIRCLE".
So it looks like the CommandFlags.Undefined enum automatically undefines the command.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!