Hi Jürg Menzi :
Thanks for posting the source code... I guess I was not clear in my first
post !!!
Autocad have a comand call "group", I manage to used this command and
successfully give name to each of the group.... Now In my drawing I have too
many group and I want to be able to get the group name by click on the
objects... I hope this make more sense to you... thank you
best regards
Binny
"Jürg Menzi "
<=?UTF-8?Q?J=C3=BCrg_Menzi_?=> wrote in message
news:4936376@discussion.autodesk.com...
Hi Binny
Some basics:
[code]
(defun MeGetGroupName (Ent / CurDct CurGps)
(setq CurDct (dictsearch (namedobjdict) "ACAD_GROUP")
CurGps (cdar CurDct)
)
(apply 'append
(mapcar
'(lambda (l)
(if (member Ent (MeGetSubLst 340 (dictsearch CurGps l)))
(list l)
)
) (MeGetSubLst 3 CurDct)
)
)
)
(defun MeGetSubLst (Key Lst)
(mapcar
'cdr
(vl-remove-if-not
'(lambda (l) (equal (car l) Key))
Lst
)
)
)
[/code]
Use:
(MeGetGroupName (car (entsel)))
Cheers
--
Jürg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch
-------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you
are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is
strictly
forbidden.