Hi everyone,
I'm looking for a way to copy a text or a simple line, circle... ; after I copied it, the last entity change its color to green.
Thank you for helping.
@Anonymous wrote:
...I'm looking for a way to copy a text or a simple line, circle... ; after I copied it, the last entity change its color to green.
....
The down-and-dirty simplest way would be something like this, in AutoLISP terms:
(command
"_.copy" pause "" pause pause
"_.chprop" "_last" "" "_color" 3 ""
); end command
Or, in menu macro terms:
^C^CCOPY \;\\CHPROP L ;C 3 ;
That approach depends on the User not missing when they pick something, and on its not being on a locked Layer, and on the User not needing to do something like enter an Object-snap mode for one of the copy points, and so on. And it can only do one object, not a multiple-object selection. Something could be made that's much more sophisticated to overcome all those limitations.
You're welcome -- that was a comparatively easy one. For examples of some of the sophistications that can be introduced, see any number of routines on this forum, for example, OffsetToLayer.lsp here. It does some of the things you might want to do [e.g. checks for locked Layer], and some things you might or might not [e.g. allows only certain entity types], and some you definitely don't need here [e.g. saves choices and offers them as defaults on later use]. But given something it can work with, it ends up using the same CHPROP command, though it applies a different option.