并没有看代码,但你们可以有一个列表框,它可以有很多行,你们喜欢,滚动上下。它可以通过读取文本文件来实现,即为您想要选择的内容放置一个简短的版本。
; very much thanks to Alan J T for original code ;; List Select Dialog (Temp DCL list box selection, based on provided list) ;; title - list box title ;; label - label for list box ;; height - height of box ;; width - width of box ;; multi - selection method ["true": multiple, "false": single] ;; lst - list of strings to place in list box ;; Alan J. Thompson, 09.23.08 / 05.17.10 (rewrite)(defun AT:ListSelect (title label height width multi lst / fn fo d item f) (setq fo (open (setq fn (vl-filename-mktemp "" "" ".dcl")) "w")) (foreach x (list (strcat "list_select : dialog { label = "" title ""; spacer;") (strcat ": list_box { label = "" label "";" "key = "lst";") (strcat "allow_accept = true; height = " (vl-princ-to-string height) ";") (strcat "width = " (vl-princ-to-string width) ";") (strcat "multiple_select = " multi "; } spacer; ok_cancel; }") ) (write-line x fo) ) (close fo) (new_dialog "list_select" (setq d (load_dialog fn))) (start_list "lst") (mapcar (function add_list) lst) (end_list) (setq item (set_tile "lst" "0")) (action_tile "lst" "(setq item $value)") (setq f (start_dialog)) (unload_dialog d) (vl-file-delete fn) (if (= f 1) ((lambda (s / i s l) (while (setq i (vl-string-search " " s)) (setq l (cons (nth (atoi (substr s 1 i)) lst) l)) (setq s (substr s (+ 2 i))) ) (reverse (cons (nth (atoi s) lst) l)) ) item ) )); basicly make a list LST of the lines to be displayed then call it(setq surface (car (AT:ListSelect "Set new surface style" "Select style" 10 10 "false" (vl-sort (mapcar (function car) lst) '<) ) ) ) ; end setq
PRINT-LIST是打印列表的名称。(您可以为其命名其他名称)
PRINT-SCENE是表示主打印页的原子。
附加场景是场景的附加层列表。此列表可以为空(NIL)或包含所需的任意多个附加层。
INT-PRINT-STATUS是打印类型的原子。平面图或剖面图。此处输入的数据为0或1,不能为零。
就对话框而言,我将显示一个文本框,显示打印列表的当前状态。像现在一样,可以使用对话框上的按钮添加、删除或重新排列图纸。关联列表应该是用于显示和打印表单的一条信息。用户与对话框的交互应相应地重写列表。有了这个列表,你可以很容易地提取信息。