Try this [minimally tested]:
(defun C:CHRCE ; = Cross-Hairs in Rectangles, Circles, Ellipses
(/ ss ent pl)
(if
(setq ss
(ssget
(list
'(-4 . "<OR")
'(0 . "CIRCLE"); any Circle(s)
'(-4 . "<AND") '(0 . "LWPOLYLINE") '(90 . 4) '(-4 . "&") '(70 . 1) '(-4 . "AND>")
; only 4-vertex closed Polyline(s)
'(-4 . "<AND") '(0 . "ELLIPSE") '(41 . 0.0) (cons 42 (* pi 2)) '(-4 . "AND>")
; only closed Ellipse(s)
'(-4 . "OR>")
); list
); ssget
); setq
(repeat (setq n (sslength ss)) ; then
(setq
ent (ssname ss (setq n (1- n)))
pl (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE"); is a Polyline [T or nil]
); setq
(command
"_.line"
"_none" (vlax-curve-getPointAtParam ent (if pl 0.5 0))
"_none" (vlax-curve-getPointAtParam ent (if pl 2.5 pi)) ""
"_.line"
"_none" (vlax-curve-getPointAtParam ent (if pl 1.5 (/ pi 2)))
"_none" (vlax-curve-getPointAtParam ent (if pl 3.5 (* pi 1.5))) ""
); command
); repeat
); if
); defun
I added Ellipses, because they can be done in exactly the same way as Circles using the (vlax-curve) parameters.
It draws the Lines on the current Layer, but a particular Layer setting could be built in [or any other desired properties].
It does not [yet, but could be enhanced to] verify that a 4-sided closed Polyline is, in fact, rectangular, nor that it contains only line segments, so it will also do things like these:

Another thing it could be enhanced to recognize, if desired, is a "circle" that is actually a two-equal-arc-segment Polyline, such as made by the DONUT command.
Kent Cooper, AIA