ripuz 发表于 2022-7-6 08:34:26

选择vs(命令“选择”)

大家好!
 
我想选择刚插入的块。
这很好:
 

[*]write "select" on the command line and hit enter
[*]write "L" and hit enter
[*]hit enter to end the command

现在已选择块。
 
 
 
我认为这将以完全相同的方式工作:

(command "select" "L" "")

未选择块。。。
 
为什么?
如何从autolisp中选择块?

Dadgad 发表于 2022-7-6 08:49:12

你可能想看看这个。http://www.cadtutor.net/forum/showthread.php?59216-select-last-quot-n-quot-entities-draw-inside-a-lisp

Tharwat 发表于 2022-7-6 09:00:08

是的,好裁判达加德。
 
使用函数entlast选择最后一个实体,以及上述参考文献中的许多示例。

ripuz 发表于 2022-7-6 09:03:56

我知道我可以用entlast获得实体,但我如何选择它?
我所说的“选择它”的意思是,我只是在没有任何活动命令的情况下单击它。
我希望它看起来像这样:

Tharwat 发表于 2022-7-6 09:11:31

你可能是这个意思。。。
 
(sssetfirst nil (ssadd (entlast)))

ripuz 发表于 2022-7-6 09:19:12

 
这正是我想要的!
非常感谢/托马斯

Tharwat 发表于 2022-7-6 09:26:54

不客气,托马斯。

fixo 发表于 2022-7-6 09:42:11

这是等效代码

(sssetfirst nil (ssget "_L"))
页: [1]
查看完整版本: 选择vs(命令“选择”)