|
发表于 2002-3-22 21:51:00
|
显示全部楼层
你可以使用命令选项右键菜单啊,无需使用PopMenu,下面的例子是用VL写的,VBA的同样也可以这样构造输入提示字符串来实现选项右键菜单
eg:
(defun C:your-function ( / ....)
; save some system variables and error handle
(setq nType 25; init nType
sType (itoa nType)
)
(while (setq esl (entsel "\nSpecify a line :"))
(setq en (car esl)
el (entget en)
etype (cdr (assoc 0 el))
)
(if (= etype "LINE")
(progn
(setq nType-in (getint
(strcat "\nSpecify type is DNxxx [15/20/25/32/40/50/65/70/100/125/150/200/250/300/350/400] : "
)
)
)
(if nType-in
(setq nType nType-in
sType (itoa nType)
)
);endif
;....
;.... //add your codes here
;....
);end progn
(princ "\nNot a LINE object.");else
);end if
);end while
;restore system variables and error handle
(princ)
);end defun C:your-function |
|