找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 638|回复: 3

[LISP程序]:请问选择集最大限制是多少啊?

[复制链接]
发表于 2004-12-5 20:52:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
今天做一个裁图的程序,在做选择裁减是出现
error: exceeded maximum number of selection sets
这是为什么啊?
请问选择集最大限制是多少啊?
怎么样能取消限制啊?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2004-12-5 22:45:31 | 显示全部楼层
Re: Where find selection set max
From the AutoCAD 2002 Developer help:
"Attempting to manage a large number of selection sets simultaneously is not
recommended. An AutoLISP application cannot have more than 128 selection sets
open at once. (The limit may be lower on your system.) When the limit is
reached, AutoCAD refuses to create more selection sets. Keep a minimum number of
sets open at a time, and set unneeded selection sets to nil as soon as possible.
If the maximum number of selection sets is reached, you must call the gc
function to free unused memory before another ssget will work."

Using (gc) may still not free up selection sets if each is bound to a unique
variable.

This is basically the same as that posted July 2003 by Jason Piercey <sheesh,
even the function name's the same!>:
(defun C:ClearSS ( / n)
(setq n 0)
(foreach item (atoms-family 0)
(and
(= (type (eval item)) 'PICKSET)
(setq n (1+ n))
(set item nil)
)
)
(gc)
(princ (strcat "\nCleared out " (itoa n) " selection sets."))
(princ)
)

--
John Uhden, Cadlantic
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2004-12-6 21:52:47 | 显示全部楼层
应该是128个。但是我记得好象那是在ARX中才有这个限制,LISP也是128个的上限吗?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2004-12-7 09:29:27 | 显示全部楼层
感谢楼主提议,又学了一招,原来是128,但我选的超过128也能计算(也许是某大哥将选集优化了)
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2025-9-27 17:23 , Processed in 0.171660 second(s), 38 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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