I need to manipulate various predefined groups of blocks - but don't know how to even get to them to get started.
Since groups are a non-graphical object (similar to fields I'm guessing) filtering ssget sees them but doesn't grab them!
Any Ideas ??
Solved! Go to Solution.
Solved by Lee_Mac. Go to Solution.
Solved by hmsilva. Go to Solution.
As a demo
;; a list with all Groups Enames (setq grouplst (cdrs 350 (dictsearch (namedobjdict) "ACAD_GROUP"))) ;; a list with all Enames in the first group (setq first_group (cdrs 340 (entget (nth 0 grouplst)))) ;; Michael Puckett (defun cdrs (DxfKey ImpLst / TmpLst OutLst) (while (setq TmpLst (assoc DxfKey ImpLst)) (setq OutLst (cons (cdr TmpLst) OutLst) ImpLst (cdr (member TmpLst ImpLst)) ) ) (reverse OutLst) );; cdrs
HTH
Henrique
You can also tackle the problem using Visual LISP by accessing the Groups collection, e.g.:
(defun groupobjects ( / lst rtn ) (vlax-for grp (vla-get-groups (vla-get-activedocument (vlax-get-acad-object))) (vlax-for obj grp (setq lst (cons obj lst))) (setq rtn (cons (list (vla-get-name grp) lst) rtn) lst nil ) ) rtn ) (vl-load-com) (princ)
Excellent help - thanks so much. I've got a pile of regular drafting work building up on my desk right now,
but I really look forward to getting back to my lisp project becuase this is going to work very well.