怎么把命令行改成带记忆的屏幕菜单模式?
本帖最后由 zilong136 于 2024-3-8 14:23 编辑如何改成带记忆的屏幕菜单模式?也就是空格的时候,默认上一次选择?
[*]
[*](defun BT (tip s / k)
[*](initget (apply 'strcat (mapcar '(lambda(x)(strcat (strcase x )" "))(mapcar 'cadr s))))
[*](setq k (getkword (apply 'strcat (append (list "\n选择功能[") (mapcar '(lambda(x)(strcat (car x)"("(strcase (cadr x))")/"))s) (list "]")))))
[*](if (and k (setq k (assoc k (mapcar 'cdr s)))(setq k (strcat (cadr k)" ")))
[*] (vla-SendCommand (vla-get-ActiveDocument (vlax-get-acad-object)) k)
[*])
[*])
[*]
[*](defun c:xg ()
[*] (prompt "\n xg:构造线")
[*](setvar"DYNMODE" 1)
[*](bt "选择功能" '(("指定点" "1" "xline")("水平(H)" "2" "xline H")("垂直(V)" "3" "xline V")("角度(A)" "4" "xline A")("二等分(B)" "5" "xline B")("偏移(O)" "6" "xline O")))
[*](setvar"DYNMODE" 0)
[*])
(initget 7 "3P 2P T")
(getkword "指定圆的圆心或[三点(3P)/两点(2P)/切点、切点、半径(T)]")
大概就是这个意思 系统自带的arc下拉需要按下箭头 KeyWord 了解一下。 Bao_lai 发表于 2024-3-7 21:20
KeyWord 了解一下。
表示不会
页:
[1]