Remove Group LISP
Remove Group LISP
(OP)
Does anyone know of a LISP that will delete all groups from a drawing. I don't want to delete the enities of the group - but just want to get rid of the grouping without having to manually delete each grouped object (hope that makes sense)
Thanks!
Thanks!





RE: Remove Group LISP
RE: Remove Group LISP
RE: Remove Group LISP
;without destroying their member elements
;Please post debugging results
;written by Dr. Tigrek
;www.homescript.com
(defun C:Disband()
(setq objdict (namedobjdict))
(setq grpdict (dictsearch objdict "ACAD_GROUP"))
(IF (setq SONNY (dxf 3 grpdict))
(princ "\nGroups and Bands Found in County - and disbanded:")
(princ "\nCounty clean of Groups and Bands")
)
(princ "\n")
(while (setq grpdict (member (assoc 3 grpdict) grpdict))
(princ "\n")
(princ (setq GroupName (cdr (car grpdict))))
(setq GroupEDNA (cdr (assoc 350 grpdict)))
(entdel GroupEDNA)
(setq grpdict (cdr grpdict))
)
(princ)
)
RE: Remove Group LISP
Command:
Command: DISBAND
; error: no function definition: DXF
Command:
This was copied from the command line after I ran the program.
RE: Remove Group LISP
Thanks for the debug feedback.
(defun dxf (n ed) (cdr (assoc n ed)))