(GetSurfaceArea2)<== 이함수는 개인이 만든 함수입니다 그러므로 이함수가 캐드에 로딩이 돼있어야 하겠죠.. 단축키(2008기준) AP로 찾아서 로딩 하세요
안녕하세요 리습을 공부하고 있습니다.
위 사이트 예제중에 MyPopupLists를 해 보고 있는데
다음과 같은 에러가 뜹니다.
MyPopupLists; 오류: no function definition: SET_TILE_LIST
원인이 뭘까요 고수님의 조언 부탁드립니다.
감사합니다.^^
//———————————————————————————————————
// MyPopupLists
//———————————————————————————————————
MyPopupLists : dialog {
key = “Title”;
label = “”;//Title$ from lsp file
initial_focus = “List1”;
spacer;
: row {//<
fixed_width = true;
: column {
width = 24.76;
fixed_width = true;
spacer;
: text {
key = “Text1”;
label = “”;//Text1$ from lsp file
}
}
: popup_list {
key = “List1”;//Value1$ from lsp file
width = 11.42;
fixed_width = true;
}
}//>
: row {//<
fixed_width = true;
: column {
width = 24.76;
fixed_width = true;
spacer;
: text {
key = “Text2”;
label = “”;//Text2$ from lsp file
}
}
: popup_list {
key = “List2”;//Value2$ from lsp file
width = 11.42;
fixed_width = true;
}
}//>
spacer;
ok_only;
}//MyPopupLists
;———————————————————————————————————-
; c:MyPopupLists – Dialog to select choices from popup lists
; Syntax: MyPopupLists
;———————————————————————————————————-
(defun c:MyPopupLists (/ Dcl_Id% List1@ List2@ Return# Value1$ Value2$)
(princ “nMyPopupLists”)(princ)
; Set Default Variables
(if (not *MyPopupLists@);Unique global variable name to store dialog info
(setq *MyPopupLists@ (list nil “” “”))
);if
(setq Value1$ (nth 1 *MyPopupLists@)
Value2$ (nth 2 *MyPopupLists@)
List1@ (list “” “Red” “Orange” “Yellow” “Green” “Cyan” “Blue” “Magenta”)
List2@ (list “” “0” “1” “2” “3” “4” “5” “6” “7” “8” “9”)
);setq
; Load Dialog
(setq Dcl_Id% (load_dialog “MyPopupLists.dcl”))
(new_dialog “MyPopupLists” Dcl_Id%)
; Set Dialog Initial Settings
(set_tile “Title” ” My Popup Lists”)
(set_tile “Text1” “My Favorite Color”)
(set_tile_list “List1” List1@ Value1$);*Included
(set_tile “Text2” “My Favorite Number”)
(set_tile_list “List2” List2@ Value2$);*Included
; Dialog Actions
(action_tile “List1” “(set_list_value ”List1@” ”Value1$”)”);*Included
(action_tile “List2” “(set_list_value ”List2@” ”Value2$”)”);*Included
(setq Return# (start_dialog))
; Unload Dialog
(unload_dialog Dcl_Id%)
(setq *MyPopupLists@ (list nil Value1$ Value2$))
(princ)
);defun c:MyPopupLists
공유
리습관련 함수를 정의하는 방법을 알려주세요.
안녕하세요.
표면적을 구하는 리습인데요.
제가 실행을 하면
no function definition : getsurfacearea2
이렇게 뜹니다.
도금구간을 구할 때 유용하게 사용되는 리습인데요. 실행이 안됩니다.
이 리습이 월래 AutoCAD2013Mechanical 에서 사용하던 리습입니다.
제가 함 사용을 해볼려구 autocad2013 버전에 실행을 해봣는데요..
안되네요.
(defun dan_cal1()
(Setq dArea (GetSurfaceArea2))
(if dArea
(progn
(setq text_point (getpoint “n 삽입 기준점: “))
;;(setq text_point1 ‘(330.0 65.0 0.0))
(initGet 7)
;;(setq dia_size (getstring “nDIA&CBN SIZE 입력 : “))
(command “text” text_point “3” “0” (STRCAT “표면적 : ” (rtos dArea 2 1) ” mm^2″))
;;(command “text” text_point1 “3” “0” (STRCAT “# : ” DIA_SIZE))
(princ)
);end of progn
);end of if
)
이렇게 되어있습니다.
해결방안 부탁드려요..
함수 정의 하는 방법을 알려주세요.
공유
-
사무실에서 사용하는 리습이 이런경우가 많죠 (개인이 개인의 용도로 만든경우는 거의 모든 함수를한파일에 넣어 놓는데.. 사무실에서 사용하는경우는 여러 리습에서 같이 사용하도록 폴더단위로 관리하니 다른곳에 복사해서 사용하려고 하거나 하면 이런식으로 파일이 모자랄 경우가 생깁니다..)또는 (GetSurfaceArea2) 함수 내용을 위 파일과 합치시던가요..합치는 방법은 간단합니다 메모장으로 두 파일을 다 열어서 (GetSurfaceArea2)내용을저 위의 파일 밑에 복사 붙혀넣기 하시면 됩니다.. 안되면 두파일 다 올리시면 합쳐드릴께요 ^^;파일 찾는법은 아시죠?? 기존에 이상없이 사용하던 컴퓨터 리습 폴더에서 찾으시면 됩니다..
올려주신 리습이 에러없이 정상적으로 작동을 합니다.
제가 초짜이고 공부중이다보니 수정된 데이터를 올려 주시면 정말 감사하겠습니다.
제 게시글 앞부분에
제 글에 관심 가져 주셔서 감사합니다.
강의 사이트에서 만든 함수같습니다 2개의 함수가 정식함수가 아니군요