Yes, ssget with activeselectionset is the best
I've had some trouble with the activeselectionset method in the past (an intermittent and inconsistent error: Automation Error. Calling method Clear of interface IAcadSelectionSet failed) and have now abandoned this method entirely.
Precisely why I abandoned its use as well.
I had the same problem that I solved using systematically erasing the selection. Since then, no problems. Now all my lisps use this method.
Look at the two lisps I posted
I would also delete the selection set [ (vla-delete sel) ] after processing, but this did not seem to resolve the issue; or are you referring to something else when you say 'solved using systematically erasing the selection'?
Sorry if my English is not great.
What I mean is that you make a selection with ssget and then your treatment with activeselectionset.
Then you make a vla-delete on activeselectionset
From what I could deduce is that a stacking selections causes this error and that systematically erasing the selection set, I do not have this problem.
I use it for years, post lisps with this method on other forums.