;| c0.lsp -- that's cee-zero Copies selected objects in place: @0,0 Prompts whether to copy objects on locked layers, if any are selected. by Bill Gilliss bill at realerthanreal dot com Comments and suggestions always welcome. No warranty, either expressed or implied, is made as to the fitness of this information for any particular purpose. All materials are to be considered 'as-is', and use thereof should be considered as at your own risk. ver 1.0 Jan 25 2010 - initial public release Keywords: AutoCAD AutoLISP copy in place =========================================================================== |; (defun c:c0 ( / ss n en locked copyLocked) (prompt "Select objects to copy @0,0:") (setq ss (ssget) n 0 count 0) (while (< n (sslength ss)) (setq en (ssname ss n)) (setq locked (cdr (assoc 70 (tblsearch "LAYER" (cdr (assoc 8 (entget en))))))) (if (or (< locked 4) (equal copyLocked "Yes")) (progn (entmake (entget en)) (setq count (1+ count)) ) (progn (if (not copyLocked) (progn (initget 1 "Yes No") (setq copyLocked (getkword "Copy objects on locked layers (Yes or No) ")) ) ) (if (equal copyLocked "Yes") (progn (entmake (entget en)) (setq count (1+ count)) ) ) ) ) (setq n (1+ n)) ) (prompt (strcat "\n" (itoa count) " objects created.")) (princ) )