I have been using a LISP routine to simulate the old 'group' commands in AutoCAD Mechanical 2012.
This program has worked flawlessly for SEVEN STRAIGHT YEARS, including my current install of AutoCAD.
Suddenly and mysteriously, it has stopped working. The program starts normally, asking the user to select the objects to group, then appears to complete normally, but the selected objects are not grouped.
Other users in my office on the same CAD version can use this program with the expected results. The problem is limited only to my installation. I have tried compete reboots of both AutoCAD and my entire system, but to no avail.
Is there a system variable that could be causing this? Or anything else that may come to mind?
Thanks,
Pete
Here is the LISP code...
; Description: File contains functions used to simulate old AutoCAD "group"
; commands. File is always loaded on AutoCAD startup to insure command
; availability.
;
; Revisions: 08/29/06 - Updates for AutoCAD 2007.
;
(defun c:mgrp ( / ss)
(princ "\nSelect object to group: ")
(if (setq ss (ssget))
(command "-group" "_create" "*" "" ss "")
)
(princ)
)
(defun c:dgrp ( / ent gname)
(if (setq ent (car (entsel "\nSelect group to ungroup: ")))
(if (and (gnames ent) (setq gname (nth 0 (gnames ent))))
(command "-group" "explode" gname)
(princ "\nSelected object is not a member of a group.")
)
)
(princ)
)
(defun gnames (ename / key dct rtn)
(setq key (cons 340 ename)
dct (dictsearch (namedobjdict) "acad_group"))
(while (setq dct (member (assoc 3 dct) dct))
(if (member key (entget (cdadr dct)))
(setq rtn (cons (cdar dct) rtn))
)
(setq dct (cddr dct))
)
(reverse rtn)
)
(princ)
Solved! Go to Solution.
Solved by pendean. Go to Solution.
EXCELLENT. Thank you so much!
I'm going to read up on PICKSTYLE. You're probably amazed I'm not the least bit familiar with it.