Currently I've got this working -
you've noticed that your function is 'recursive'?
the purpose of you filtering is unclear to me
why don't you want to use (ssget "_I" (list (cons 0 "~HATCH"))) ?
Hi,
The point is while constantly selecting to filter out the hatch objects - the key is in lines 13. and 14.
"Recursion" stops when no acDbHatch objects are contained within the current selection.
My question was is if I could avoid the SS iteration in the 1st place - my callback function seems to be clumsy.
I don't know if I understand the question correctly ... perhaps the easiest way is the fastest:
(setq NewSSt (ssadd))
(repeat (setq i (sslength SS))
(or
(= "HATCH" (cdr (assoc 0 (entget (setq EntNam (ssname SS (setq i (1- i))))))))
(setq NewSSt (ssadd EntNam))
)
)
Thanks! I've got used with these lists that I've forgot I could just rebuilt the new SS within the iteration of the original SS.