- UID
- 151438
- 积分
- 440
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-6-21
- 最后登录
- 1970-1-1
|
发表于 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 |
|