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')
Gets the minimum access mode required to execute this command.
Commands with higher mode requirements can only be executed when the document is opened in a compatible mode. Higher value modes are compatible with lower value modes.
The minimum access mode required
Sets the minimum access mode required to execute this command.
The minimum access mode (Read, Review, or Write)
ProtectedsettingsCurrent settings used by this command instance when creating hatches.
Gets the custom user-defined data associated with this command.
userData is a generic, strongly-typed container that allows consumers
of the command to attach arbitrary metadata without modifying the
command class itself.
The shape of userData is defined by the generic parameter TUserData
when the command is declared:
The user-defined data object associated with this command
interface MyCommandData {
sourceLayerId: string
isPreview: boolean
}
class MyCommand extends AcEdCommand<MyCommandData> {}
const cmd = new MyCommand()
cmd.userData.sourceLayerId = 'Layer-01'
cmd.userData.isPreview = true
This design provides flexibility similar to THREE.Object3D.userData
while preserving full compile-time type safety.
ProtectedappendCreates and appends one hatch entity from computed loops.
Active command context.
Boundary loops to be added to the hatch.
true when hatch entity was created; otherwise false.
ProtectedcollectScans model space and builds closed loops from all supported boundaries.
This is used by pick-points mode so a seed point can be resolved against all potential loops in the drawing.
Active command context.
Closed loops derived from all hatchable entities.
ProtectedcollectBuilds closed loops from explicit object ids.
Active command context.
Object ids selected by the user.
Closed loops ready for hatch creation.
ProtectedconfigureAllows specialized hatch commands to apply additional entity properties before the hatch is added to model space.
Hatch entity being created.
ProtecteddoExecutes pick-points branch of HATCH.
The user can place multiple seed points. Each accepted point attempts one hatch creation, and pressing Enter terminates this branch.
Active command context.
true if at least one hatch was created.
ProtecteddoExecutes object-selection branch of HATCH.
Active command context.
true if a hatch was created from selected objects.
Runs the interactive command-line HATCH workflow.
Main loop behavior:
Active command context.
Promise resolved when command ends.
ProtectedkeywordConverts command keyword string to hatch style enum.
Keyword returned by prompt API.
Matching hatch style enum, defaulting to Normal.
ProtectednormalizeNormalizes pattern name input.
Raw user-entered pattern name.
Trimmed name, or SOLID when input is empty.
ProtectednotifySends a message to the UI module through the global event bus.
Message text to display
Optionaltype: AcEdMessageTypeMessage severity controlling the rendered style
ProtectedonCalled after the command has finished executing.
This lifecycle hook is intended for cleanup or follow-up logic, such as:
The default implementation does nothing.
The current application context
ProtectedonCalled right before the command starts executing.
This lifecycle hook is intended for subclasses that need to perform
setup work before execute() runs, such as:
The default implementation does nothing.
The current application context
ProtectedpromptPrompts for associative mode switch (Yes / No).
Promise resolved when prompt flow completes.
ProtectedpromptPrompts for pattern angle (degrees) and updates persisted settings.
Promise resolved when prompt flow completes.
ProtectedpromptPrompts for pattern name and updates persisted command settings.
Promise resolved when prompt flow completes.
ProtectedpromptPrompts for pattern scale and updates persisted command settings.
Promise resolved when prompt flow completes.
ProtectedpromptPrompts for hatch style (Normal / Outer / Ignore).
Promise resolved when prompt flow completes.
ProtectedresolveResolves which loops should be used for one pick-point seed.
Strategy:
Ignore.Seed point selected by user.
Candidate loops.
Ordered loop set to append into one hatch entity.
ProtectedshowDisplays a message in the command-line output.
Message text to render
Optionaltype: AcEdMessageTypeMessage severity controlling the rendered style
OptionalmsgKey: stringOptional localization key associated with the message
ProtectedstyleConverts hatch style enum to command keyword string.
Hatch style enum value.
Command keyword name used by keyword prompts.
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-line HATCH command (no dialog), inspired by AutoCAD flow.
Current scope: