vanowm 发表于 2022-7-5 20:02:07

如何提示选择对象

你好
 
例如,fillet命令允许选择对象或输入“R”来设置半径。我如何实现相同的功能?
 
非常感谢。

pBe 发表于 2022-7-5 20:17:59

(initget "Yipee")
(setq op (entsel "\nSelect /Y for Yipppeee :"))

vanowm 发表于 2022-7-5 20:27:56

有趣的谢谢
 
关于选择多个对象并具有多个关键字,有什么窍门吗?

pBe 发表于 2022-7-5 20:41:07


(prompt "Your prompt")
             (if (null ssget)
                            (initget "Your Keyword")
                               (getkword "Here There Everywhere")
                                       (cond
                                             (("Here")...)
                                             (("THere")...)
                                             (("Everywhere")...)
                                             )

BlackBox 发表于 2022-7-5 20:51:57

(if(or(and(not(initget“This tHat”))(setq opt(getkword“\n您想为所有项选择[这个/那个]:)(princ(strcat“\n**选择“opt”**”))(和(ssetfirst nil(ssget“\u x”))(princ“\n**选择所有项*);;

Lee Mac 发表于 2022-7-5 21:13:33

 
使用多个关键字当然是可能的,但是,由于ssget函数不支持使用initget(因为它已经有自己的关键字来控制选择行为),您只能使用单个对象选择提示(例如使用entsel/nentsel/nentselp),除非您测试ssget提示是否返回空值(即用户按下Enter键),正如其他人所表明的那样。
 
我建议您阅读initget函数的文档。
页: [1]
查看完整版本: 如何提示选择对象