multi insert 명령어 입니다.
보시는바와 같이 명령어가 iii 이고
explode (y/n) 할때 y든, n 든
실행이 안됩니다.
Command: III
Explode Y/N <Y>: Y
no function definition: DOS_GETFILEM
Command:
이렇게 뜨는데요
리습 수정ㅇ 어떻게 해야하나요
현재 윈7에 64비트 인데 캐드는 2010 32비트 설치해서 씁니다. 드림써야되서
명령어 안되는것도 몇개 있긴 한데 불편할 정도는아닌데요
멀티 인서트 인되는건 ㅜㅜ 망…
(defun ErrHandle (Err)
(if (and (/= Err “quit / exit abort”)
(/= Err “Function cancelled”)
)
(princ Err)
)
(setq *error* OldError)
(princ)
)
;;;실제로 도면을 인서트 하는 함수
(defun ins_file (last_file_name explode_id)
(if (= explode_id “1”)
(progn
(setq xlast_l_file_name (strcat “*” last_file_name))
(command “insert” xlast_l_file_name “\” “” “”)
)
(command “insert” last_file_name “\” “” “” “”)
)
)
;;;명령어 함수
(defun c:iii (/ choice all_list DP sel_path other_list lst_ea ins_lst
choice1)
(setq OldError *error*)
(setq *error* ErrHandle)
(STARTUP)
(vmon)
(setvar “cmdecho” 0)
(initget “Y N”)
(setq choice (getkword “n Explode Y/N <Y>: “))
(setq DP (getvar “DWGPREFIX”))
(setq all_list (dos_getfilem
“다중도면 불러들이기”
DP
“Drawing (*.dwg)|*.dwg|Dxf (*.dxf)|*.dxf”
)
)
(setq sel_path (car all_list))
(setq other_list (cdr all_list))
(setq lst_ea (length other_list))
(cond
((= choice “N”) (setq explode_id “0”))
(t (setq explode_id “1”))
)
(foreach x other_list
(princ “n “)
(princ x)
(setq ins_lst (strcat sel_path x))
(ins_file ins_lst explode_id)
(princ)
)
(initget “Y N”)
(setq choice1 (getkword “n ZOOM Extend Y/N <Y>: “))
(cond
((= choice1 “N”) nil)
(t (command “zoom” “e”))
)
(princ “n”)
(princ ” Total: “)
(princ lst_ea)
(princ ” 개의 도면을 Insert 하였습니다.”)
(princ)
)
;;;Startup Function
(defun STARTUP ()
(cond
((= (atoi (substr (getvar “acadver”) 1 2)) 14)
(if (not (member “doslib14.arx” (arx)))
(if (findfile “doslib14.arx”)
(arxload “doslib14”)
)
)
)
((= (atoi (substr (getvar “acadver”) 1 2)) 15)
(if (not (member “doslib2k.arx” (arx)))
(if (findfile “doslib2k.arx”)
(arxload “doslib2k”)
)
)
)
)
)
어디부분 손대야 될까요?
(setq all_list (dos_getfilem “다중도면 불러들이기” DP “Drawing (*.dwg)|*.dwg|Dxf (*.dxf)|*.dxf”))
리습 사용만 할 줄알지 언어 쪽으로는 문외한 입니다. 미안합니다
좀더 자세히 설명해주시겠어요? ㅜㅜ
다중도면 인설트 에서
DOS_GETFILEM
이함수는 아래 첨부 arx가 같이 로드 되어있어야 사용할수 있습니다.
cad버전별로 제작되어있으니 아래버전중 맞는걸로 사용하세요
감사합니다.