明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2028|回复: 6

[LISP]自己编的Lisp程序不能实行“先选择后执行”

[复制链接]
发表于 2005-8-23 13:43 | 显示全部楼层 |阅读模式

请问我自己编的Lisp程序不能实行“先选择后执行”(pickfirst=1),cad的命令如Move等却正常,可能的原因是什么??谢了先!!

发表于 2005-8-23 16:57 | 显示全部楼层

我刚才试用了一下我的程序,是没有问题的.(pickfirst可以控制)

不知道你的为什么不能.

你把程序里的变量值改成"1"了吗?

发表于 2005-8-24 08:49 | 显示全部楼层

你需要在程序中使用 ssgetfirst 函数

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.

发表于 2005-8-24 10:16 | 显示全部楼层

在程序选择语句前使用了其它影响选择的语句。

发表于 2005-8-24 11:11 | 显示全部楼层
同意楼上
发表于 2005-9-12 12:41 | 显示全部楼层

建议大家使用ap-api.fas程序中内置的函数,可以解决诸如此类的问题,非常好用。

这个程序搜索一下就有,还有英文的说明书。

 楼主| 发表于 2006-2-22 11:15 | 显示全部楼层

4楼的说法正确,原来我在执行(ssget)之前运行了(command "undo")把当前选择集给清空了。谢谢各位!

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-6 06:36 , Processed in 0.307546 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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