;Handy AutoCAD-1. Quick Mirror-2 (DEFUN C:Q1() (defun C:7(/ gp) (setq gp (ssget)); MIRROR: Delete source objects? = YES (setvar "CMDECHO" 0) (setq ORTOLD (getvar "ORTHOMODE")) (setvar "ORTHOMODE" 1) (setq pt1 (getpoint "\nPick 1st point: ")) (setq pt2 (getpoint pt1 "\nPick 2nd point: ")) (command "_mirror" gp "" pt1 pt2 "Y") (setvar "ORTHOMODE" ORTOLD) (setvar "CMDECHO" 1) (PRINC) ) (defun C:8(/ gp) (setq gp (ssget)); MIRROR: Delete source objects? = NO (setvar "CMDECHO" 0) (setq ORTOLD (getvar "ORTHOMODE")) (setvar "ORTHOMODE" 1) (setq pt1 (getpoint "\nPick 1st point: ")) (setq pt2 (getpoint pt1 "\nPick 2nd point: ")) (command "_mirror" gp "" pt1 pt2 "N") (setvar "ORTHOMODE" ORTOLD) (setvar "CMDECHO" 1) (PRINC) ) ;;;Quick Mirror ;=== (defun c:7I ( / xyz xyz1 uprec ptx pty gp) (setq gp (ssget)) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq pty1 (+ pty 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) pty1 (rtos pty1 2 uprec) ) (setq xyz1 (strcat "mirror p " ptx "," pty " " ptx "," pty1 " y 7I ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:7II ( / xyz xyz1 uprec ptx pty gp) (setvar "CMDECHO" 0) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq pty1 (+ pty 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) pty1 (rtos pty1 2 uprec) ) (setq xyz1 (strcat "mirror L " ptx "," pty " " ptx "," pty1 " y 7I ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) (setvar "CMDECHO" 1) (PRINC) ) ;=== (defun c:7- ( / xyz xyz1 uprec ptx pty gp) (setq gp (ssget)) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq ptx1 (+ ptx 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) ptx1 (rtos ptx1 2 uprec) ) (setq xyz1 (strcat "mirror p " ptx "," pty " " ptx1 "," pty " y 7- ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:7-- ( / xyz xyz1 uprec ptx pty gp) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq ptx1 (+ ptx 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) ptx1 (rtos ptx1 2 uprec) ) (setq xyz1 (strcat "mirror L " ptx "," pty " " ptx1 "," pty " y 7- ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:8I ( / xyz xyz1 uprec ptx pty gp) (setq gp (ssget)) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq pty1 (+ pty 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) pty1 (rtos pty1 2 uprec) ) (setq xyz1 (strcat "mirror p " ptx "," pty " " ptx "," pty1 " N 8I ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:8II ( / xyz xyz1 uprec ptx pty gp) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq pty1 (+ pty 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) pty1 (rtos pty1 2 uprec) ) (setq xyz1 (strcat "mirror L " ptx "," pty " " ptx "," pty1 " N 8I ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:8- ( / xyz xyz1 uprec ptx pty gp) (setq gp (ssget)) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq ptx1 (+ ptx 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) ptx1 (rtos ptx1 2 uprec) ) (setq xyz1 (strcat "mirror p " ptx "," pty " " ptx1 "," pty " N 8- ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;=== (defun c:8-- ( / xyz xyz1 uprec ptx pty gp) (setq uprec 13) (setq xyz (getpoint "Specify first point of mirror line: ")) (setvar "OSNAPCOORD" 1) (setq ptx (car xyz) pty (cadr xyz) ) (setq ptx1 (+ ptx 10)) (setq ptx (rtos ptx 2 uprec) pty (rtos pty 2 uprec) ptx1 (rtos ptx1 2 uprec) ) (setq xyz1 (strcat "mirror L " ptx "," pty " " ptx1 "," pty " N 8- ")) (setq fil (open "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr" "w")) (write-line xyz1 fil) (close fil) (setvar "filedia" 0) (command "script" "C:/HA-1 QuickMirror/TextFiles/xyzdata.scr") (setvar "filedia" 1) ) ;;;