If the rods are horizontally aligned, here's my take on it:
(defun C:RodX(/ *error* doc svn svv ctr1 ctr2 ctr3 ctr4 rad)
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(prompt (strcat "\nError: " errmsg))
); if
(mapcar 'setvar svn svv); reset System Variables
(vla-endundomark doc)
(prin1)
); defun - *error*
(vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object))))
(setq
svn '(osmode cmdecho blipmode clayer); System Variable Names
svv (mapcar 'getvar svn); and current Values
); setq
(setvar 'osmode 4); CENter
(setq
ctr1 (getpoint "\nRod center at first corner of X: ")
ctr3 (getpoint "\nRod center at opposite corner of X: ")
ctr2 (list (car ctr1) (cadr ctr3))
ctr4 (list (car ctr3) (cadr ctr1))
); setq
(initget (if *RodXdia* 6 7)); no zero, no negative, no Enter on first use
(setq *RodXdia*
(cond
( (getdist
(strcat
"\nDiameter of Circles"
(if *RodXdia* (strcat " <" (rtos *RodXdia*) ">") "")
": "
); strcat
); getdist
); User-input condition
(*RodXdia*); prior value if present on Enter when allowed
); cond
rad (/ *RodXdia* 2)
); setq
(mapcar 'setvar svn '(0 0 0)); turn off Osnap, command echo, blips
(command
"_.layer" "_make" "SNA-DIM" "_color" 9 "" ""
"_.circle" ctr1 rad
"_.copy" "_last" "" "_multiple" ctr1 ctr2 ctr3 ctr4 ""
"_.line" (polar ctr1 (angle ctr1 ctr3) rad) (polar ctr3 (angle ctr3 ctr1) rad) ""
"_.line" (polar ctr2 (angle ctr2 ctr4) rad) (polar ctr4 (angle ctr4 ctr2) rad) ""
"_.line" (inters ctr1 ctr3 ctr2 ctr4) (polar (getvar 'lastpoint) 0 (* (abs (- (car ctr1) (car ctr3))) 1.5)) ""
"_.layer" "_make" "SNA-TXT-2" "_color" 4 "" ""
); command
(command-s "_.text" "_style" "ROMANS0.8" "_ml" (polar (getvar 'lastpoint) 0 rad) 80 0)
(mapcar 'setvar svn svv); reset
(vla-endundomark doc)
(prin1)
)
You can pick the CENters [Object Snap built in for that] of two rod dots at any two opposite corners of the desired X location, in either order.
It includes the horizontal Line rightward from the X intersection, and the Text, which it leaves you to provide content for [you don't get to see it on-screen as you type, but just type it, answering the prompt in the Command line]. It currently uses the Text Style & height in your sample drawing, but could be made to ask for either or both of those and remember what you give it. It needs the Style to exist in the drawing, without fixed height as in your sample, but could be made to create it, as it does with the Layers.
It remembers your Circle Diameter [once you have given it one], and offers it as default on subsequent use, so you don't need to enter it repeatedly.
Kent Cooper, AIA