Files
cadcraft/crates/engine/src
18d3aa4ed8 CHPROP: change properties at the command line, as AutoCAD asks for them (#2497)
* Add CHPROP, asking for properties as AutoCAD does

CHPROP selects objects, then asks "Enter property to change
[Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency]" until Enter,
applying each value through properties.set. Measured from AutoCAD 2024
through AutoLISP's command: colours 1-255, names, BYLAYER, BYBLOCK or
Truecolor; 0, 256 and 300 refused; a layer must exist; a linetype not
loaded is loaded from the standard file; a lineweight goes to the nearest
standard one with a note.

Keyword prefixes now have to reach past the keyword's last capital, so
"L" alone matches none of LAyer, LType, ltScale and LWeight, as in
AutoCAD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CHPROP tests: transparency, and refused true colours and transparencies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CHPROP leaves objects on locked layers out, as AutoCAD does

Each pick and the pickfirst selection lose the objects on locked layers,
followed by "1 was on a locked layer." or "N were on a locked layer.";
with none of the pickfirst selection left, CHPROP asks for objects. The
JSON chprop leaves them out too and returns {changed, locked}.

The keywords test also pins QDIM's DA and PEDIT's vertex E, which AutoCAD
2024 refuses although only one keyword starts with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chprop: look up locked handles in a set, and always report "locked" (CodeRabbit)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-30 15:46:27 -04:00
..