mtaussie 发表于 2022-7-6 09:52:05

复制图层提示样式

我正在寻找一种方法来提示用户选择直线/圆/选项。如果用户选择了选项,我希望能够返回到线/圆/选项的主要选择,直到他们选择线或圆。在选项中,我将使用图层/线型。。。
我迷路了,不知道我应该用布尔值还是用一段时间,或者选择什么。
任何想法,
马特·沃兰德

Tharwat 发表于 2022-7-6 10:09:18

看看这个。。。。。。。
 

(initget "Line Circle Options")
(setq reply (getkword "\n Specify your way [ Line,Circle,Options ]:"))

 
当做
 
塔瓦特

Lee Mac 发表于 2022-7-6 10:31:48

下面是一个简单的例子,我不理解你试图实现的目标:
 

(defun c:test ( / flag ans1 ans2 )

(while (not flag)

   (initget 1 "Line Circle Options")
   (setq ans1 (getkword "\nChoose Option : "))

   (if (eq "Options" ans1)
   (progn
       (initget 1 "Layer lineType")
       (setq ans2 (getkword "\nChoose Secondary Option : "))

       (alert (strcat "You chose: " ans2))
   )
   (setq flag T)
   )
)

(princ)
)
这里有一个更复杂的例子:
 
那一次有点得意忘形。。。
 
 
这也可能有助于您:
http://lee-mac.com/promptwithdefault.html

mtaussie 发表于 2022-7-6 10:43:37

很抱歉延迟回复,这些正是我想要的。谢谢你

Lee Mac 发表于 2022-7-6 11:05:31

不客气,马特
页: [1]
查看完整版本: 复制图层提示样式