;(R)=ARES






;*******************
(Defun C:FlagELstyle ()
;*******************
      (if (Getenv "BFZyn")
            (Setq BFZyn (Getstring (Strcat "\n接頭辞[ Y:表記あり/N:表記なし ] <" (Getenv "BFZyn") ">:")))
            (Setq BFZyn (Getstring (Strcat "\n接頭辞[ Y:表記あり/N:表記なし ] < >:")))
      )
      ;-------------------
      (if (= "" BFZyn)
           (Setq BFZyn (Getenv "BFZyn"));Enter/空打--->従前値採用
      )
     (Setenv "BFZyn" BFZyn);<---扱いは文字列（数字は扱えない:NG）
     ;-------------------
     (if (Or (Equal BFZyn "Y") (Equal BFZyn "y"))
           (Progn
                (if (Getenv "接頭辞Z")
                    (Setq 接頭辞Z (Getstring (Strcat "\n接頭辞 <" (Getenv "接頭辞Z") ">:")))
                    (Setq 接頭辞Z (Getstring (Strcat "\n接頭辞 < >:")))
                )
                ;-------------------
                (if (= "" 接頭辞Z)
				(Setq 接頭辞Z (Getenv "接頭辞Z"));Enter/空打--->従前値採用
                )
                (Setenv "接頭辞Z" 接頭辞Z);
           )
     )
     ;-------------------
     (princ)
);End








;*******************
(Defun C:FlagELSetDL ()
;*******************
  (setq DLPoint (Getpoint "\nDL点を指定:"))
  (setq DLx (nth 0 DLPoint))
  (setq DLy (nth 1 DLPoint))
      (Setenv "DLy" (rtos DLy));<---扱いは文字列（数字は扱えない:NG）
      ;(alert "")
      (if (Getenv "DL値")
            (Setq DL値 (Getstring (Strcat "\nDL値を入力 <" (Getenv "DL値") ">:")))
            (Setq DL値 (Getstring (Strcat "\nDL値を入力 < >:")))
      );if
      ;-------------------
      ;(alert "")
      (if (= "" DL値)
            (Setq DL値 (Getenv "DL値"));Enter/空打--->従前値採用
      )
      (Setenv "DL値" DL値)
      ;(alert "")
  (princ)
);End










;*******************
(Defun C:FlagELZ ()
;*******************
      (Command "OsnapCoord" "1" "-Layer" "M" "FlagEL" "")
      (Command "Grips" "2")
      (setq MyPoint (Getpoint "\n計測する点を指定:"))
      (setq Px (nth 0 MyPoint))
      (setq Py (nth 1 MyPoint))
      ;-------------
      (Command "ID" "@")
      ;-------------
      (Setq Delta (- Py (atof (getenv "DLy"))));素地
      (Setq Delta  (rtos (* Delta (Atof (Getenv "係数")))))；作図単位による調整
      ;(Setq Delta  (rtos (atof Delta) 2 (Atoi (Getenv "小数点"))))
            ;(Alert Delta)
      (Setq ELy (+ (atof (Getenv "DL値")) (atof Delta)))
      (Setq ELy (rtos Ely 2 (Atoi (Getenv "小数点"))))
            ;(Alert ELy)
      ;-------------
      (if (Equal (StrCase (Getenv "BFZyn")) "Y")
            (Setq MyBF (Getenv "接頭辞Z"))
            (Setq MyBF "")
      )
      (Setq MyText (Strcat MyBF ELy))
            ;(Alert  MyText)
      ;-------------
      (Command "Leader" MyPoint "_non" Pause "a" MyText "")
      (Command "Grips" "2")
      ;-------------
  (princ)
);End
