明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 901|回复: 3

[讨论] lisp如何实现先选中图元再输入命令进行操作

[复制链接]
发表于 2015-4-14 12:17:47 | 显示全部楼层 |阅读模式
如题,就像cad自带的Move命令一样,先选中图元再输入Move命令,然后就可以直接移动了。
求思路。
发表于 2015-4-14 13:34:59 | 显示全部楼层
ssgetfirst Function

Determines which objects are selected and gripped

(ssgetfirst)

Returns a list of two selection sets similar to those passed to sssetfirst. The first element in the list is a selection set of entities that are gripped but not selected. The second element is a selection set of entities that are both gripped and selected. Either (or both) elements of the list can be nil.

Note  Only entities from the current drawing's model space and paper space, not nongraphical objects or entities in other block definitions, can be analyzed by this function.

See Also

The ssget and sssetfirst functions.
发表于 2015-4-14 13:56:51 | 显示全部楼层
ssget 放在defun里面第一句,先取得选择集再执行其它操作
 楼主| 发表于 2015-4-14 15:00:16 | 显示全部楼层
Andyhon 发表于 2015-4-14 13:34
ssgetfirst Function

Determines which objects are selected and gripped

了解啦,(ssgetfirst) 判断一下就ok啦!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-5-23 10:24 , Processed in 0.191781 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表