Another version where the objecterased reactor is only on during the ERASE command.
Sorry for the delay of my answer.
I do not know how to thank you for the enormous job you did!
Indeed you have solved the problem that I had requested last post, but in a way that does not fit my actual needs.
If you read my first post you'll see that I must find the value of some XDATA stored inside objects before they are deleted.
I try to explain better:
each object can contain the following XDATA:
(-3 ("NAMEAPP" (1000 . "ID=5")))
To extract the xdata ID of an object, usually using the following function:
(setq id_obj (ReadXdata obj "NAMEAPP" "ID"))
(defun ReadXdata (ogg nomeapp labeldato / dato elist exlist thexdata labelfind dato nX sublista)
(setq nX 0)
(setq elist (entget ogg (list nomeapp)))
(setq exlist (assoc -3 elist))
(if (/= exlist nil)
(progn
(setq thexdata (cdr (car (cdr exlist))))
;--
(setq sublista (nth nX thexdata))
(if sublista
(setq labelfind (splittaemi (cdr sublista) "=" 0))
(setq labelfind nil)
)
(while (/= labelfind nil)
(if (= labelfind labeldato)
(progn
(setq sublista (nth nX thexdata))
(if sublista (setq dato (splittaemi (cdr sublista) "=" 1)))
(setq labelfind nil)
)
(progn
(setq nX (+ nX 1))
(setq sublista (nth nX thexdata))
(if sublista
(setq labelfind (splittaemi (cdr sublista) "=" 0))
(setq labelfind nil)
)
)
)
)
(setq dato dato)
)
)
;--
)
Everything works fine when the object is present in the drawing.
Now I need to obtain the xdata "ID" immediately before it is deleted.
With your function unfortunately I can not do it ....
I'm sorry you missed all this time.
I am so insistent because I absolutely need to solve this problem, otherwise the interruption of the entire application.
Hope you can help me some more ....