0 Members and 1 Guest are viewing this topic.
;;; CMI.lsp;;; To Copy and mirror selected entities;;;;;; by Terrance Kesteloot and Rod Potter;;; credit to Steve Smith Compuserve I.D.:72611,2544(DEFUN ssmake (sslist) (SETQ theset (SSADD)) (FOREACH ent sslist (SSADD (HANDENT ent) theset)))(DEFUN C:CMI () (SETQ cecho (GETVAR "CMDECHO")) ;;turn off command line echo (SETVAR "CMDECHO" 0) (SETQ theset nil thelist nil ) ;;obtain last entity in database (SETQ startent (ENTLAST)) (PROMPT "Entity(s) copy and mirror routine") (PROMPT "\nCopying...") ;;create selection set (SETQ sset (SSGET)) (SETQ bpt (GETPOINT "\nEnter base point for copy...")) (COMMAND "copy" sset "" bpt pause) (SETQ npt (GETVAR "LASTPOINT")) ;;build selection set list of newly copied entities (SETQ thelist (LIST (CDR (ASSOC 5 (ENTGET startent))))) (SETQ nextone startent) (WHILE nextone (PROGN (SETQ nextone (ENTNEXT nextone)) (IF nextone (SETQ thelist (CONS (CDR (ASSOC 5 (ENTGET nextone))) thelist)) ) ) ) ;;list of entity handles for copied group (SETQ thelist (CDR (REVERSE thelist))) (ssmake thelist) (PROMPT "\nMirroring - select second point of mirror line for new objects..." ) (COMMAND "mirror" theset "" npt pause) ;;turn off highlight (SETVAR "highlight" 0) ;;reset command line echo to original state (SETVAR "CMDECHO" cecho) ;;turn highlight back on (SETVAR "HIGHLIGHT" 1) ;;clean finish (PRINC))
Keith....I've been using mirdo.lsp constantly since you posted it, what, two-three years ago on CADalog....? Just so you know, I'd go nuts without it! Thanks again.....
Just so you know, I'd go nuts without it!