Hi majdov24,
a quick and dirty solution...
The 'demo' is not testing if a valid object (with intersection edges) is selected by the user, if an invalid object is selected, the code will throw an error...
Sorry, I have a deadline to meet, so at the moment, I don't have much free time.
(defun c:demo (/ a b itm num ss ss1)
(if (and (princ "\nSelect a 3D solid or surface: ")
(setq ss (ssget "_+.:E:S:L" '((0 . "3DSOLID,*SURFACE"))))
(princ "\nSelect objects to imprint: ")
(setq ss1 (ssget "_:L" '((0 . "ARC,CIRCLE,LINE,*POLYLINE,ELLIPSE,SPLINE,REGION,3DSOLID"))))
)
(progn
(setq itm 0 num (sslength ss1))
(command "_.imprint" (setq a (ssname ss 0)))
(while (< itm num)
(if (not (eq a (setq b (ssname ss1 itm))))
(command b "_Y");; change to N if you don't want to delete
)
(setq itm (1+ itm))
)
(command "")
)
)
(princ)
)
Hope that helps
Henrique