(DEFUN C:Q7o()
(SETQ NLY (GETVAR "CLAYER"))
(setq STOP2SET (findfile "C:/ACAD/hon/set/STOP2.SET"))
(IF (= STOP2SET NIL)
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER STOP2 :" )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
       (setq STOP2CNT (GETSTRING T"\nSETTING STOP2 LAYER OF CONTNIUE LINE/<0>:"))
       (IF (= STOP2CNT "")
              (WRITE-LINE "0" FC)
              (WRITE-LINE STOP2CNT FC)
       )
       (setq STOP2CEN (GETSTRING T"\nSETTING STOP2 LAYER OF CENTER LINE/<CEN>:"))
       (IF (= STOP2CEN "")
              (WRITE-LINE "CEN" FC)
              (WRITE-LINE STOP2CEN FC)
       )
       (setq STOP2HID (GETSTRING T"\nSETTING STOP2 LAYER OF HIDDEN LINE/<HID>:"))
       (IF (= STOP2HID "")
              (WRITE-LINE "HID" FC)
             (WRITE-LINE STOP2HID FC)
       )
       (setq STOP2DIM (GETSTRING T"\nSETTING STOP2 LAYER OF DIMESION /<DIM1>:"))
       (IF (= STOP2DIM "")
              (WRITE-LINE "DIM1" FC)
              (WRITE-LINE STOP2DIM FC)
       )
       (setq STOP2TXT (GETSTRING T"\nSETTING STOP2 LAYER OF TEXT /<TEXT>:"))
       (IF (= STOP2TXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE STOP2TXT FC)
       )
       (CLOSE FC)
    )
)

(IF (/= STOP2SET NIL)
    (PROGN
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
       (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (IF (OR (= STOP2CNT "") (= STOP2CEN "") (= STOP2HID "") (= STOP2DIM "") (= STOP2TXT "")
               (= STOP2CNT NIL) (= STOP2CEN NIL) (= STOP2HID NIL) (= STOP2DIM NIL) (= STOP2TXT NIL))
           (CLOSE FC)
       )
       (IF (OR (= STOP2CNT "") (= STOP2CEN "") (= STOP2HID "") (= STOP2DIM "") (= STOP2TXT "")
               (= STOP2CNT NIL) (= STOP2CEN NIL) (= STOP2HID NIL) (= STOP2DIM NIL) (= STOP2TXT NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER OF SCREW :" )
              (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
              (setq STOP2CNT (GETSTRING T"\nSETTING STOP2 LAYER OF CONTNIUE LINE/<0>:"))
              (IF (= STOP2CNT "")
                  (WRITE-LINE "0" FC)
                  (WRITE-LINE STOP2CNT FC)
              )
              (setq STOP2CEN (GETSTRING T"\nSETTING STOP2 LAYER OF CENTER LINE/<CEN>:"))
              (IF (= STOP2CEN "")
                  (WRITE-LINE "CEN" FC)
                  (WRITE-LINE STOP2CEN FC)
              )
              (setq STOP2HID (GETSTRING T"\nSETTING STOP2 LAYER OF HIDDEN LINE/<HID>:"))
              (IF (= STOP2HID "")
                  (WRITE-LINE "HID" FC)
                  (WRITE-LINE STOP2HID FC)
              )
              (setq STOP2DIM (GETSTRING T"\nSETTING STOP2 LAYER OF DIMESION/<DIM1>:"))
              (IF (= STOP2DIM "")
                  (WRITE-LINE "DIM1" FC)
                  (WRITE-LINE STOP2DIM FC)
              )
              (setq STOP2TXT (GETSTRING T"\nSETTING STOP2 LAYER OF TEXT /<TEXT>:"))
              (IF (= STOP2TXT "")
                  (WRITE-LINE "TEXT" FC)
                  (WRITE-LINE STOP2TXT FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
       (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nSCREW CONTINUE OF LAYER IS:" )(PROMPT STOP2CNT)(TERPRI)
       (PROMPT "\nSCREW CENTER OF LAYER IS:" ) (PROMPT STOP2CEN)(TERPRI)
       (PROMPT "\nSCREW HIDDEN OF LAYER IS:" ) (PROMPT STOP2HID)(TERPRI)
       (PROMPT "\nSCREW DIMENSION OF LAYER IS:" ) (PROMPT STOP2DIM)(TERPRI)
       (PROMPT "\nSCREW TEXT   OF LAYER IS:" ) (PROMPT STOP2TXT)(TERPRI)
    )
)
(SETQ ANS (strcase (GETSTRING "\nDO YOU WANT TO CHANGE LAST SETTING <Y/N> N:")))
(IF (= ANS "Y")
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER:" )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
       (PROMPT "\nSCREW CONTINUE OF LAYER <" )(PROMPT STOP2CNT)(PROMPT">:")
       (setq STOP2CNT (GETSTRING T))
       (IF (= STOP2CNT "")
              (WRITE-LINE "0" FC)
              (WRITE-LINE STOP2CNT FC)
       )
       (PROMPT "\nSCREW CENTER OF LAYER <" )(PROMPT STOP2CEN)(PROMPT">:")
       (setq STOP2CEN (GETSTRING T))
       (IF (= STOP2CEN "")
              (WRITE-LINE "CEN" FC)
              (WRITE-LINE STOP2CEN FC)
       )
       (PROMPT "\nSCREW HIDDEN OF LAYER <" )(PROMPT STOP2HID)(PROMPT">:")
       (setq STOP2HID (GETSTRING T))
       (IF (= STOP2HID "")
              (WRITE-LINE "HID" FC)
              (WRITE-LINE STOP2HID FC)
       )
       (PROMPT "\nSCREW DIMESION OF LAYER <" )(PROMPT STOP2DIM)(PROMPT">:")
       (setq STOP2DIM (GETSTRING T))
       (IF (= STOP2DIM "")
              (WRITE-LINE "DIM1" FC)
              (WRITE-LINE STOP2DIM FC)
       )
       (PROMPT "\nSCREW TEXT OF LAYER <" )(PROMPT STOP2TXT)(PROMPT">:")
       (setq STOP2TXT (GETSTRING T))
       (IF (= STOP2TXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE STOP2TXT FC)
       )
       (CLOSE FC)
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
      (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nSCREW CONTINUE OF LAYER NOW IS:" )(PROMPT STOP2CNT)(TERPRI)
       (PROMPT "\nSCREW CENTER   OF LAYER NOW IS:" ) (PROMPT STOP2CEN)(TERPRI)
       (PROMPT "\nSCREW HIDDEN   OF LAYER NOW IS:" ) (PROMPT STOP2HID)(TERPRI)
       (PROMPT "\nSCREW DIM      OF LAYER NOW IS:" ) (PROMPT STOP2DIM)(TERPRI)
       (PROMPT "\nSCREW TEXT     OF LAYER NOW  IS:" ) (PROMPT STOP2TXT)(TERPRI)
  )
)
(MENUCMD "S=X")
(MENUCMD "S=d11")
  (COMMAND "VSLIDE" "C:/ACAD/HON/B/Q7O")
 (SETQ dim (GETREAL"\nPLEASE SLECT THE dim OF THE ENTITY:(dim1)" ))
 (IF (OR ( = dim "" ) (= dim NIL ) )
     (PROGN
     (SETQ dim 1 )
 ))
 (IF (= dim 1 )
    (PROGN
       ( SETQ R 10   )
       ( SETQ S 1    )
       ( SETQ T 11   )
       ( SETQ U 15    )
       ( SETQ V 8     )
      ( SETQ I  1.5  )
      ( SETQ J  9.5  )
      ( SETQ K 1     )
      ( SETQ L  10.2 )
      ( SETQ M 4    )
      ( SETQ N 9.5 )
      ( SETQ O 3    )
      ( SETQ P 3.3 )
      ( SETQ X 1 )
      ( SETQ x1 2.89 )
      ( SETQ x2 4  )
      ( SETQ x3 5   )
      ( SETQ x4 2  )
      ( SETQ X5 8.89 )
              ))

(IF (= dim 2 )
   (PROGN
      ( SETQ R 11   )
      ( SETQ S 1    )
      ( SETQ T 12   )
      ( SETQ U 17    )
      ( SETQ V 7     )
       ( SETQ I  1.5  )
       ( SETQ J 12.5  )
       ( SETQ K 1     )
       ( SETQ L  14.7 )
       ( SETQ M 5    )
       ( SETQ N 12.5 )
       ( SETQ O 4    )
       ( SETQ P 4.3 )
       ( SETQ X 1    )
       ( SETQ x1 2.89 )
       ( SETQ x2 4  )
       ( SETQ x3 5   )
       ( SETQ x4 2  )
       ( SETQ X5 8.89 )

        ))


(IF (= dim 3 )
  (PROGN
            ( SETQ R 12.5 )
            ( SETQ S 1    )
            ( SETQ T 13.5 )
            ( SETQ U 17    )
            ( SETQ V 10    )
       ( SETQ I  1.5  )
       ( SETQ J 15.5  )
       ( SETQ K 1     )
       ( SETQ L  16.2 )
       ( SETQ M 6    )
       ( SETQ N 15.5 )
       ( SETQ O 5    )
       ( SETQ P 5.3 )
       ( SETQ X 1.0  )
       ( SETQ x1 4.04 )
       ( SETQ x2 4  )
       ( SETQ x3 7   )
       ( SETQ x4 2  )
       ( SETQ X5 10.04 )
        ))
      (IF (= dim 4 )
         (PROGN
            ( SETQ R 15.5 )
            ( SETQ S 1    )
            ( SETQ T 16.5 )
            ( SETQ U 19    )
            ( SETQ V 12.5  )
       ( SETQ I  1.5  )
       ( SETQ J  17.5  )
       ( SETQ K 1     )
       ( SETQ L  18.2 )
       ( SETQ M 7    )
       ( SETQ N 17.5 )
       ( SETQ O 6    )
       ( SETQ P 6.3 )
       ( SETQ X 1.0  )
       ( SETQ x1 4.91 )
       ( SETQ x2 4  )
       ( SETQ x3 8.5 )
       ( SETQ x4 2  )
       ( SETQ X5 10.91 )
              ))


      (IF (= dim 5 )
         (PROGN
            ( SETQ R 18   )
            ( SETQ S 1    )
            ( SETQ T 19   )
            ( SETQ U 19    )
            ( SETQ V 15    )
       ( SETQ I  1.5  )
       ( SETQ J 22.5  )
       ( SETQ K 1     )
       ( SETQ L  23.2 )
       ( SETQ M 8    )
       ( SETQ N 22.5 )
       ( SETQ O 7    )
       ( SETQ P 7.3 )
       ( SETQ X 1.0  )
       ( SETQ x1 4.91 )
       ( SETQ x2 4  )
       ( SETQ x3 8.5 )
       ( SETQ x4 2  )
       ( SETQ X5 10.91 )
        ))


      (IF (= dim 6 )
         (PROGN
            ( SETQ R 20.5 )
            ( SETQ S 1    )
            ( SETQ T 21.5 )
            ( SETQ U 22    )
            ( SETQ V 17.5  )
       ( SETQ I   3   )
       ( SETQ J  26   )
       ( SETQ K 1     )
       ( SETQ L  26.7 )
       ( SETQ M 10   )
       ( SETQ N 26  )
       ( SETQ O 9    )
       ( SETQ P 9.3 )
       ( SETQ X 1 )
       ( SETQ x1 4.91 )
       ( SETQ x2 4  )
       ( SETQ x3 8.5 )
       ( SETQ x4 2  )
       ( SETQ X5 10.91 )
                ))
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (COMMAND "REDRAW")
  (SETQ P1 (GETPOINT"\n SLECT P1 BASE POINT:"))
  (SETQ P2 (GETPOINT P1"\n SELECT P2 BASE POINT:"))
  (SETQ AG1 (ANGLE P1 P2 ) )
  (SETQ AG2 (* PI 0.5 ))
  (SETQ GG (DISTANCE P1 P2 ))
  (SETQ W (- GG (+ S U ) ) )
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (SETQ DR1   (POLAR P1 (- AG1 AG2 )   R           ))
  (SETQ  R1   (POLAR P1     AG1        S            ))
  (SETQ DR2   (POLAR  r1 (- AG1 AG2 )  T            )      )
  (SETQ  R2   (POLAR R1     AG1         U           ))
  (SETQ DR3   (POLAR  R2 (- AG1 AG2 )  T              ))
  (SETQ DR4   (POLAR  R2 (- AG1 AG2 )  V            )      )
  (SETQ DR5   (POLAR DR4    AG1         W           ))
 (SETQ DR11  (POLAR P1 (+ AG1 AG2 )   R           ))
 (SETQ  R1   (POLAR P1     AG1        S            ))
 (SETQ DR22 (POLAR  r1 (+ AG1 AG2 )  T            )      )
 (SETQ  R2   (POLAR R1     AG1         U           ))
 (SETQ DR33  (POLAR  R2 (+ AG1 AG2 )  T              ))
 (SETQ DR44  (POLAR  R2 (+ AG1 AG2 )  V            )      )
 (SETQ DR55  (POLAR DR44   AG1         W           ))
   (COMMAND "LAYER" "S" STOP2cnt"")
 (COMMAND "LINE" DR1  DR2 DR3 DR4 DR5  "")
 (COMMAND "LINE" DR55 DR44 DR33 DR22 DR11 "")
 (COMMAND "LINE" DR2  DR22   "")
 (COMMAND "LINE" DR4 DR44 "")


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

   (COMMAND "LAYER" "S" STOP2cnt"")
(SETQ P3    (POLAR P1    AG1  (+ (+ S U   ) W )        ))
(SETQ P4    (POLAR P3      AG1       I   ))
(SETQ P5    (POLAR P4     AG1         J   )      )
(SETQ P6    (POLAR P5     AG1    K   ))
(SETQ GR1   (POLAR P3   (- AG1 AG2 )   P             ))
(SETQ GR2   (POLAR GR1    AG1     I   )      )
(SETQ GR3   (POLAR GR2     AG1  J     ))
(SETQ GR4    (POLAR P4   (- AG1 AG2 )  M            ))
(SETQ GR5    (POLAR GR4     AG1        J            )      )
(SETQ GR6    (POLAR P6    (- AG1 AG2 ) O   ))
(SETQ GR11  (POLAR P3   (+ AG1 AG2 )   P             ))
(SETQ GR22  (POLAR GR11   AG1     I  )   )
(SETQ GR33  (POLAR GR22    AG1    J   ))
(SETQ GR44   (POLAR P4   (+ AG1 AG2 )  M            ))
(SETQ GR55   (POLAR GR44    AG1        J            )      )
(SETQ GR66   (POLAR P6    (+ AG1 AG2 ) O   ))
(SETQ GR7    (POLAR GR2     AG1        L     ))
(SETQ GR77   (POLAR GR22     AG1    L      ))
 (COMMAND "LINE" GR1 GR2 GR4 GR5 GR6 GR66 GR55 GR44 GR22 GR11 "")
 (COMMAND "LINE" GR5 GR55  "")
 (COMMAND "LINE" GR4 GR44   "")
 (COMMAND "LINE" GR2  GR7   "")
(COMMAND "LINE" GR22 GR77  "")
;(COMMAND "LINE" GR55 GR7  "")
;(COMMAND "LINE" GR77  GR5  "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (COMMAND "LAYER" "S" STOP2cnt"")
(SETQ Q1    (POLAR P1  (- AG1 AG2  ) X1 ))
(SETQ Q2    (POLAR Q1  (- AG1 AG2 ) X1  ))
(SETQ Q3     (POLAR Q2   AG1     X2   ))
(SETQ Q4     (POLAR Q3  (+ AG1 AG2 ) (- (* 2 X1 ) X3 )    )      )
(SETQ Q5    (POLAR Q4     AG1   X4   )   )
(SETQ Q6    (POLAR P1     AG1   X5   )   )
(SETQ Q11   (POLAR P1  (+ AG1 AG2  ) X1 ))
(SETQ Q22   (POLAR Q11 (+ AG1 AG2 ) X1  ))
(SETQ Q33    (POLAR Q22  AG1     X2   ))
(SETQ Q44    (POLAR Q33 (- AG1 AG2 ) (- (* 2 X1 ) X3 )))
(SETQ Q55   (POLAR Q44    AG1   X4   )   )
(SETQ Q9     (POLAR Q1     AG1  x2 ))
(SETQ Q8     (POLAR Q11    AG1  x2 ))
(COMMAND "LINE"    Q2 Q3 Q4 Q5 Q6 Q55 Q44 Q33 Q22      "")
(COMMAND "LINE" Q4 Q44  "")
(COMMAND "LINE" Q5 Q55  "")
(COMMAND "LINE" Q1 Q9   "")
(COMMAND "LINE" Q11 Q8  "")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(SETQ P7     (POLAR P6      AG1      1.0 ))
(SETQ P11    (POLAR P1    (+ AG1 PI  ) 1.0 ))
(COMMAND "LAYER" "S" STOP2CEN"")
(COMMAND "LINE" P7 P11 "")
(COMMAND "LAYER" "S" NLY "")
)
