;; 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 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 REVBY $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
)
)
)
天才虽然你已经知道了。来自美国的祝福李和感恩节快乐! 谢谢,我很高兴能帮上忙 嘿,李,我的一个同事刚刚提出了一个有效的观点,这真的没什么大不了的,因为无论如何,我更喜欢更改缩写。当用户打开一个图形只是为了打印而不改变任何东西时,有没有一种方法可以在其中写入if语句。。意思是没有更改,然后忽略正在更改的用户首字母? 嗯,上面的请求比这个请求最不重要。。是否有方法添加另一条语句来交叉检查DRAWBY或DRAWNBY属性中的这些首字母,如果DRAWBY或DRAWNBY首字母与当前用户完全相同,则不要为REVBY、REVIBY属性标记值输入首字母。。只是一个想法。
只是不运行命令? 这完全有道理,我向你们保证,我想了一下,哈哈,但是我保证,我的命令与我们的plot命令相结合,因为大多数用户往往忘记更改他们的缩写,所以我冒昧地以编程方式进行了更改。这很好,虽然真的没什么大不了,我只是好奇。 That would make total sense and I assure you I gave it some thought, lol, I promiseHowever, I have the command piggybacking with our plot command because most users tend to forget to change their initials so I took the liberty to do it programmatically. Its fine though really no big deal I was just curious.
页:
1
[2]