0 Members and 1 Guest are viewing this topic.
(defun C:PG () (vlax-for FOR-ITEM (vla-get-groups (vla-get-activedocument (vlax-get-acad-object) ) ) (if (= (vla-get-count FOR-ITEM) 0) (vla-delete FOR-ITEM) ) ) (princ))
Code: [Select](defun C:PG () (vlax-for FOR-ITEM (vla-get-groups (vla-get-activedocument (vlax-get-acad-object) ) ) (if (= (vla-get-count FOR-ITEM) 0) (vla-delete FOR-ITEM) ) ) (princ))
Quote from: paulmcz on November 09, 2005, 12:36:15 PMCode: [Select](defun C:PG () (vlax-for FOR-ITEM (vla-get-groups (vla-get-activedocument (vlax-get-acad-object) ) ) (if (= (vla-get-count FOR-ITEM) 0) (vla-delete FOR-ITEM) ) ) (princ))Hey....this code is cool..can I add it in to one of mine ?also, is Paulmcz = paul mckenzie
(defun c:PurgeUnusedGroups ( / dictionary ename group ) (setq ename (cdr (assoc -1 (setq dictionary (dictsearch (namedobjdict) "acad_group" ) ) ) ) ) (foreach pair dictionary (if (eq 3 (car pair)) (if (null (assoc 340 (dictsearch ename (setq group (cdr pair)) ) ) ) (entdel (dictremove ename group)) ) ) ) (princ))