Creates a new command instance.
Initializes the command with empty names. Subclasses should set appropriate global and local names in their constructors.
Readonly
eventsEvents fired during command execution lifecycle
Fired after the command finishes executing
Fired just before the command starts executing
Gets the global (untranslated) name of the command.
The global name is typically used for programmatic access and should remain consistent across different language localizations.
The global command name
Sets the global (untranslated) name of the command.
The global command name (e.g., 'LINE', 'CIRCLE', 'ZOOM')
Gets the local (translated) name of the command.
The local name is displayed to users and should be localized to the current language/region.
The localized command name
Sets the local (translated) name of the command.
The localized command name (e.g., 'Draw Line', 'Zoom In')
Executes the quick new command.
Opens the ISO template from the CDN to create a new document with standard drawing settings.
The application context (unused in this command)
Triggers the command execution with proper event handling.
This method should not be overridden by subclasses as it handles
the event notification workflow. Subclasses should implement the
execute()
method instead.
The execution flow:
commandWillStart
eventexecute()
methodcommandEnded
eventThe current application context containing view and document
Command for creating a new CAD document from a template.
This command opens a predefined template drawing (acadiso.dxf) from a CDN to create a new document. The template provides:
This is equivalent to "Quick New" functionality in traditional CAD applications, providing users with a ready-to-use drawing environment.
Example