Developing solutions can be a challenge and on this page notes are maintained - maybe they can help you!
LISP and groups
How can we handle named and unnamed groups?
If you want to do operations within a group you can use what is documented here: http://adndevblog.typepad.com/autocad/2012/12/how-to-add-a-group-in-a-selection-set-from-an-autolisp-function.html. A cached version:
(defun selgrp (grpname) ;; grpname is the group name, it accepts ;; unnamed groupnames, such as *A1 (setq grp (dictsearch (namedobjdict) "ACAD_GROUP")) (setq a1 (dictsearch (cdr (assoc -1 grp)) grpname)) (setq ss (ssadd)) (while (/= (assoc 340 a1) nil) (setq ent (assoc 340 a1)) (setq ss (ssadd (cdr ent) ss)) (setq a1 (subst (cons 0 "") ent a1)) ) ss )