I've read through the posts so far. As a review and addition, I will collect the ideas so far.
There is no direct conversion but the activeselection set can be used as effectively as an ordinary selection set and in some cases better. So there is usually no need to convert if the coding is set to use the activeX selection.
(vlax-for n myActiveSs
;;do stuff or convert to enames and do stuff
)
You could create a new ordinary selection set from the an activeselection as below. Your concerns are exceeding the selection set limits. That has rarely happened to me, but that shouldn't be a problem if you are either: 1)saving the ordinary selection sets in local variables or 2) saving them into a limited number of global variables. ;
;;given that the activeX selection is in ss
(setq ss2 (ssadd))
(vlax-for n ss
(ssadd (vlax-vla-object-ename n) ss2)
)
;then ss2 now holds the translated selection set.
As @cadffm showed, as long as the same variable is used to store a selection set, you can create as many as you need. Each selection set will have a different ename without causing an error. In the following, use the select command to select objects. Then execute.
(repeat 1000
(setq ss (ssget "p")
))
No error will be generated.
In most cases, the problem with too many selection sets has to do with the propagation of too many activeX selection sets. This generally doesn't happen because vla-get-activeselectionset seems to add only a single selection set no matter how many times it is used. The selection set it creates is always named "Current". If no selection is active, it doesn't recreate the selection set. If objects have just been selected, then it reuses the same "CURRENT" selection set. Only when an application uses vla-add on the selectionsets collection could activeX selections proliferate. Even then it is required that names be unique and not empty.
(vlax-for n (vla-get-selectionsets(vla-get-active-document(vlax-get-acad-object)))
(vla-delete n)
)
I just generally save, close and reopen the drawing since it happens very rarely.
Architect, Registered NC, VA, SC, & GA.