;;;*THIS PARAMETRIC ROUTINE DRAWS DOORS
;;;*Written by K. Ramage February 1995.
;;;*--------------------------------------------------------
(DEFUN C:DOR1 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)

  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP N 900.0)
        P2 (POLAR IP W 900.0)
        P3 (POLAR P2 N THK)
        P4 (POLAR P2 N (/ THK 2))
        P5 (POLAR IP N (/ THK 2))
        P6 (POLAR IP W 450.0)
        P7 (POLAR P3 E 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P1
           P2
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR1
(DEFUN C:DOR2 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP N 900.0)
        P2 (POLAR IP E 900.0)
        P3 (POLAR P2 N THK)
        P4 (POLAR P2 N (/ THK 2))
        P5 (POLAR IP N (/ THK 2))
        P6 (POLAR IP E 450.0)
        P7 (POLAR P3 W 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P2
           P1
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR2                      
(DEFUN C:DOR3 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP S 900.0)
        P2 (POLAR IP W 900.0)
        P3 (POLAR P2 S THK)
        P4 (POLAR P2 S (/ THK 2))
        P5 (POLAR IP S (/ THK 2))
        P6 (POLAR IP W 450.0)
        P7 (POLAR P3 E 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P2
           P1
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR3
(DEFUN C:DOR4 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP S 900.0)
        P2 (POLAR IP E 900.0)
        P3 (POLAR P2 S THK)
        P4 (POLAR P2 S (/ THK 2))
        P5 (POLAR IP S (/ THK 2))
        P6 (POLAR IP E 450.0)
        P7 (POLAR P3 W 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P1
           P2
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR4
(DEFUN C:DOR5 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP W 900.0)
        P2 (POLAR IP S 900.0)
        P3 (POLAR P2 W THK)
        P4 (POLAR P2 W (/ THK 2))
        P5 (POLAR IP W (/ THK 2))
        P6 (POLAR IP S 450.0)
        P7 (POLAR P3 N 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P1
           P2
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR5
(DEFUN C:DOR6 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP W 900.0)
        P2 (POLAR IP N 900.0)
        P3 (POLAR P2 W THK)
        P4 (POLAR P2 W (/ THK 2))
        P5 (POLAR IP W (/ THK 2))
        P6 (POLAR IP N 450.0)
        P7 (POLAR P3 S 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P2
           P1
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR6
(DEFUN C:DOR7 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP E 900.0)
        P2 (POLAR IP S 900.0)
        P3 (POLAR P2 E THK)
        P4 (POLAR P2 E (/ THK 2))
        P5 (POLAR IP E (/ THK 2))
        P6 (POLAR IP S 450.0)
        P7 (POLAR P3 N 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P2
           P1
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR7
(DEFUN C:DOR8 (/ N S W E P1 P2 P3 P4 P5 P6 P7 IP)
;;;*---------------------------------------------------------
;;;*CONVERT TO RADIANS
  (SETQ N   (* PI (/ 90.0 180.0))
        S   (* PI (/ 270.0 180.0))
        W   PI
        E   0
        ANG (* PI (/ 30.0 180.0))
  ) ;setq
;;;*----------------------------------------------------------
;;;*INITIALISE
  (SETQ doc (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))
  (VLA-STARTUNDOMARK doc)
  (initerr)
  (SETVAR "CMDECHO" 0)
  (SETVAR "BLIPMODE" 0)
  (SETVAR "OSMODE" OLDSNAP)
;;;*----------------------------------------------------------
  (INITGET 1)
  (SETQ IP  (GETPOINT "\nInsertion Point : ")
        THK (GETDIST IP "\nWall Thickness : ")
  ) ;setq
  (SETVAR "OSMODE" 0)
    ;(setvar "PICKBOX" 0)
  (SETQ P1 (POLAR IP E 900.0)
        P2 (POLAR IP N 900.0)
        P3 (POLAR P2 E THK)
        P4 (POLAR P2 E (/ THK 2))
        P5 (POLAR IP E (/ THK 2))
        P6 (POLAR IP N 450.0)
        P7 (POLAR P3 S 450.0)
  ) ;setq
  (COMMAND "_ARC"
           "_C"
           IP
           P1
           P2
           "_LINE"
           IP
           P1
           ""
           "_LINE"
           P2
           P3
           ""
           "_TRIM"
           P4
           P5
           ""
           P6
           P7
           ""
  ) ;command
  (VLA-ENDUNDOMARK doc)
;;;*RESET ENVIROMENT
  (reset)
  (PRINC)
)   ;defun C:DOR8
;;;*==========================================================
(DEFUN initerr ()
  (SETQ oldlayer (GETVAR "clayer"))
  (SETQ oldsnap (GETVAR "osmode"))
  (SETQ oldpick (GETVAR "pickbox"))
  (SETQ temperr *error*)
  (SETQ *error* trap)
  (PRINC)
)   ;defun
;;;*===========================================================
(DEFUN trap (errmsg)
  (COMMAND nil nil nil)
  (IF (NOT (MEMBER errmsg '("console break" "Function Cancelled"))
      ) ;_ end of not
    (PRINC (STRCAT "\nError: " errmsg))
  ) ;                 
  (SETVAR "clayer" oldlayer)
  (SETVAR "blipmode" 0)
  (SETVAR "menuecho" 0)
  (SETVAR "highlight" 1)
  (SETVAR "osmode" oldsnap)
    ;(setvar "pickbox" oldpick)
  (PRINC "\nError Resetting Enviroment ")
  (TERPRI)
  (SETQ *error* temperr)
  (PRINC)
)   ;defun
;;;*===========================================================
(DEFUN reset ()
  (SETQ *error* temperr)
  (SETVAR "clayer" oldlayer)
  (SETVAR "blipmode" 0)
  (SETVAR "menuecho" 0)
  (SETVAR "highlight" 1)
  (SETVAR "osmode" oldsnap)
    ;(setvar "pickbox" oldpick)
  (PRINC)
)   ;defun
;;;*======================================================
(PRINC)
;|«Visual LISP© Format Options»
(200 2 4 2 T "end of " 100 9 2 0 nil nil T nil T)
;*** ÍÅ äîáàâëÿéòå òåêñò ïîä êîììåíòàðèÿìè! ***|;
