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

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




;*******************MyScriptを実行
(defun C:RunMyScr ( / SCRyn )
;*******************
    (Setenv "SCRyn" "N")
    ;+++++	
    (setq SCRyn (getstring (strcat "\nMyScriptを実行しますか？[ Y:はい/N:いいえ ] ")))
    (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 )
;*******************
    (Setenv "SCRyn" "N")
    (setq pt nil)
    ;+++++
    (setq SCRyn (getstring (strcat "\nMyScriptを実行しますか？[ Y:はい/N:いいえ ] ")))
    (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)
);------------------------------------------------





