明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: toeastone

请教高手,超出选择集数量的最大范围

  [复制链接]
发表于 2009-8-30 16:42:00 | 显示全部楼层
Help 文件上面的原话:
  
Selection
sets consume AutoCAD temporary file slots, so AutoLISP is not permitted to have
more than 128 open at one time. If this limit is reached, AutoCAD cannot create
any more selection sets and returns nil to all ssget calls. To close an
unnecessary selection set variable, set it to nil.

大意是:选择集会消耗 AutoCAD 的临时文件容量。所以 AutoCAD 限制最多 128 个活跃的选择集。如果达到了这个限度,就不能再创建新的选择集了,所有新的 ssget 调用都会返回 nil。要关闭不需要的选择集,将选择集变量设置为 nil 即可。

楼主可能将选择集都存入了全局变量中,他们不能被系统自动释放而累计到最大限度吧

不知道如果将选择集存放在函数局部变量中,函数调用结束时,选择集会不会被自动被释放呢?
发表于 2009-8-30 18:14:00 | 显示全部楼层
选集不要搞太多,用完及时清空,必要的时候把实体名列表保存以备反复调用
发表于 2009-8-30 21:52:00 | 显示全部楼层

不知如何解决

刚开的图运行程序也会这样吗?

不过代码可以简化

(ssget '((0 . "text,insert,....")) )

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

本版积分规则

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

GMT+8, 2024-10-1 12:12 , Processed in 0.226179 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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