在lsp文件中新加: (defun test:act:list2 () (cond ((= 4 $REASON) (GETVALOFDIA) (DONE_DIALOG 2009) ) ) ) 在setdialog函数中新加: (or xdata (setq xdata "")) (start_list "list2") (add_list xdata) (end_list) 在C:getdata中 的(if (or (= RE 2) (= RE 3))... 前面加:(action_tile "list2" "(test:act:list2)") 后面加:如果(= 2009 re)则: (if (setq pl (entsel "选一个PL:")) (setq xdata (mapcar 'cdr (cdr (cadr (assoc -3 (entget (car pl) (list "PipeSolid-*" "PipeWay-*") ) ) ) ) ) ) ) (START_DIALOG) |