(defun c:dOff ( / *error* of undo doc ss )
(vl-load-com)
(defun *error* ( msg )
(and undo (vla-EndUndomark doc))
(or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
(princ (strcat "\n** Error: " msg " **")))
(princ)
)
(if (and (setq gru (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))))
(setq of (getdist "\nSpecify Offset Distance: ")))
(progn
(setq undo
(not
(vla-StartUndomark
(setq doc
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
)
)
)
)
(vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))
(mapcar
'(lambda ( elem )
(vl-catch-all-apply 'vla-offset (list obj elem))
)
(list of (- of))
)
)
(vla-delete ss)
(vl-cmdf "_ERASE" gru "")
(setq undo (vla-EndUndoMark doc))
)
)
(princ)
)
I set the ssget with the variable gru: (setq gru (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))))
The gru selection is deleted: (vl-cmdf "_ERASE" gru "")
Aesthetically it's a variation that might make purists cringe and I don't blame them, not least because I try to avoid the command and vl-cmdf function, but it's the one that's much quicker to write.