designerstuart 发表于 2022-7-7 00:17:30

separate commands for mirror (

what would be the best way to have two separate commands for the two mirror options, erase source object "yes" and "no"?
 
say i wanted MM for mirror 'yes' and MN for mirror 'no' but still wanted the commands to stay the same, i.e. select objects, first point of line etc.
 
i reckon with this customisation i could be looking at saving around 20 seconds of work every day. highly worthwhile i'm sure you'll agree. :wink:

alanjt 发表于 2022-7-7 00:39:55

(defun c:M1 (/ ss) (if (setq ss (ssget "_:L"))   (command "_.mirror" ss "" PAUSE PAUSE "_Y") ) (princ))(defun c:M2 (/ ss) (if (setq ss (ssget "_:L"))   (command "_.mirror" ss "" PAUSE PAUSE "_N") ) (princ))

designerstuart 发表于 2022-7-7 00:52:04

wow, superfast, thanks alan. can you please explain what the _:L means?
i understand the rest, well mostly. does it tell the CAD gremlins what is being selected?

alanjt 发表于 2022-7-7 00:54:19

LoL, pretty much. It just tells the ssget function to ignore objects on locked layers.

designerstuart 发表于 2022-7-7 01:13:39

and naturally, it works like a dream. thanks!

alanjt 发表于 2022-7-7 01:19:08

Welcome.......
页: [1]
查看完整版本: separate commands for mirror (