feat(command): ADDSELECTED draws a new object like the selected one (#239)

Take the first selected entity as a template, adopt its general
properties (layer, colour, linetype, lineweight, linetype scale) as the
current defaults, then start the matching draw command so the object
drawn next inherits them.

Supports Point, Line, Circle, Arc, Ellipse, all polylines (PLINE), Text,
MText, Spline, Hatch, Solid, Ray and XLine; other types report that
creation is unsupported. Registered for command-line autocomplete.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-01 18:42:26 +03:00
commit 18fff5cf8c
2 changed files with 121 additions and 0 deletions

View file

@ -520,6 +520,8 @@ inventory::submit!(crate::command::CommandRegistration {
"SELECTALL",
"SELECTSIMILAR",
"SELSIM",
// Draw a new object of the same type as the selected one. (#239)
"ADDSELECTED",
"SHEETSET",
"SHORTCUTS",
"SSM",