That's about where you wanted to create it.
(defun c:ms2ps (/ *error* ang doc enx idx lst mat nor scl sel)
(setq SS (ssadd)) ;added on line 34
(defun *error* (msg)
)
(vla-transformby obj mat)
(ssadd (vlax-vla-object->ename obj) SS) ;added line 100
)
change the selection set name to something you don't use.
erase them with this command.
(defun EraseMS2PS ()
(foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS)))
(entdel ent)
)
)
only tested on a polyline and text.