;----------MyScript実行(MyScript.lsp)

;=(R)/ARES
;---2026/03/20
;---2024/02/11
;---2023/07/14
;---2023/06/24
;<--2021/12/30




;*******************MyScriptを実行
(defun C:RunMyScr ( / SCRyn )
;*******************2026/03/20
    ;(Setenv "SCRyn" "N")
    ;+++++	
    (setq SCRyn (getstring 
        (strcat "\nMyScriptを実行しますか？[ Y:はい/N:いいえ ]<" (Getenv "SCRyn") ">:")))
    (if (= "" SCRyn)
        (setq SCRyn (Getenv "SCRyn"));Enter/空打--->従前値採用
    );if
    (Setenv "SCRyn" SCRyn);<---扱いは文字列（数字は扱えない:NG）
    ;+++++
    (if (Or (equal SCRyn "Y") (equal SCRyn "y"))
        (Command "Script" "C:/MyCANAL/MyScript.scr")
    );if
    ;+++++
    (Command "Grips" "2" "Filedia" "1")
    (princ)
);------------------------------------------------








;*******************作図基点を指定してMyScriptを実行
(defun C:RunMyScrBase ( / SCRyn pt )
;*******************2026/03/20
    ;(Setenv "SCRyn" "N")
    (setq pt nil)
    ;+++++
    (setq SCRyn (getstring (strcat "\nMyScriptを実行しますか？[ Y:はい/N:いいえ ]<" (Getenv "SCRyn") ">:" )))
    (if (= "" SCRyn)
        (setq SCRyn (Getenv "SCRyn"));Enter/空打--->従前値採用
    );if
    (Setenv "SCRyn" SCRyn);<---扱いは文字列（数字は扱えない:NG）
    ;+++++
    (if (Or (equal SCRyn "Y") (equal SCRyn "y"))
        (progn
            (setq pt (getpoint "\n<作図基点を指定>"))
            (if (/= pt nil )
                (progn
                    (Command "Base" pt "")
                    (Command "Script" "C:/MyCANAL/MyScript.scr")
                );progn
            );if
        );progn
    );if
    (Command "Grips" "2" "Filedia" "1")
    (princ)
);------------------------------------------------





