- 积分
- 4439
- 明经币
- 个
- 注册时间
- 2016-6-14
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|

楼主 |
发表于 2016-10-23 15:31:08
|
显示全部楼层
你好,请问,下面这个程序DLC衔接那里,出了什么问题?
(DEFUN C:FTT (/ ce ss se la listt selt)
(setvar "cmdecho" 0)
(setq ss (ssget))
(if (not (null ss))
(mpct)
)
(princ)
)
;;;
(defun mpct (/ w lay sslay dcl_id do_what value tbl
lenth layer clayer num a b no tem_list cood)
(SETQ W (TBLNEXT "LAYER" T))
(WHILE (/= NIL W)
(SETQ LAY (CDR (ASSOC 2 W)))
(if (/= (STRCASE lay) "DEFPOINTS")
(SETQ SSLAY (append SSLAY (list LAY)))
)
(SETQ W (TBLNEXT "LAYER"))
)
(setq dcl_id (load_dialog "ctt.dcl"))
"ctt:dialog{"
"label="图层复制";"
":list_box{"
" label="层名:";"
" key="listt";"
" height=40;"
" fixed_width_font=true;"
" multiple_select=true;"
" //allow_accept=true;"
" }"
":button{"
" label="所有层";"
" key="selallt";"
" //fixed_width=true;"
" }"
"ok_only;"
"}"
(setq do_what 3)
(while (> do_what 1)
(if (not (new_dialog "ctt" dcl_id)) (exit))
(mode_tile "listt" 2)
(start_list "listt" 2)
(mapcar 'add_list SSLAY)
(end_list)
(action_tile "selt" "(done_dialog 2)")
(action_tile "selallt" "(selallct)")
(action_tile "listt" "(setq value $value)")
(action_tile "accept" "(setq value (get_tile \"listt\"))(done_dialog 1)")
(setq do_what (start_dialog))
(if (= 2 do_what)
(setq ss (ssget))
)
)
(unload_dialog dcl_id)
(if (= 1 do_what)
(progn
(str_no value)
(setq lenth -1)
(setq pot1 (list sx sy sz)
pot2 (list ex ey ez)
)
(repeat (length tem_list)
(setq lenth (1+ lenth)
layer (nth lenth tem_list)
clayer (nth layer sslay)
)
(setq tbl (tblsearch "layer" clayer))
(if (not (null tbl))
(progn
(command "copy" ss "" "0,0,0" "0,0,0")
(command "_chprop" ss "" "la" clayer "")
)
)
)
)
)
(princ)
)
;;;
(defun selallct ()
(setq num (length sslay)
a 0
)
(while (< a num)
(if (null b)(setq b ""))
(setq b (strcat b (rtos a 2 0) " ") )
(setq a (1+ a))
)
(set_tile "listt" b)
)
;;;
(defun str_no (str)
(while (setq no (read str))
(setq tem_list (append tem_list (list no)))
(setq str (substr str (+ 2 (strlen (itoa no)))))
tem_list
)
)
|
|