下面是一个简单的例子,我不理解你试图实现的目标:
- (defun c:test ( / flag ans1 ans2 )
- (while (not flag)
- (initget 1 "Line Circle Options")
- (setq ans1 (getkword "\nChoose Option [Line/Circle/Options]: "))
- (if (eq "Options" ans1)
- (progn
- (initget 1 "Layer lineType")
- (setq ans2 (getkword "\nChoose Secondary Option [Layer/lineType]: "))
- (alert (strcat "You chose: " ans2))
- )
- (setq flag T)
- )
- )
- (princ)
- )
这里有一个更复杂的例子:
那一次有点得意忘形。。。
这也可能有助于您:
http://lee-mac.com/promptwithdefault.html |