Ok, here is what you do ...
Select the line
grab the endpoint of the line using the osnap command
create your circle at 4" away from the end of the line using the angle of the selected line.
(defun C:BOM( / index )
;initialize our counter
(setq index 1)
;while we are selecting an object
(while (setq ent (entsel))
;call the BOM routine with the entity and point
(bom ent)
;increment our counter
(setq index (1+ index))
)
)
(defun BOM( myentity )
;grab the name just in case we need it
;and the point selected, snapping to the nearest point on the line
(setq ename (car myentity)
pt1 (osnap (cadr myentity) "_near"))
;now lets get the end of the line closest to where we picked
(setq pt2 (osnap pt1 "_end"))
;get the angle of the line using the points we selected
(setq ang (angle pt1 pt2))
;create a new point 4 units from the end of the line nearest where we selected
(setq pt3 (polar pt2 ang 4))
;create a circle at that point
(entmake
(list
'(0 . "CIRCLE")
'(67 . 0)
'(100 . "AcDbCircle")
(cons 10 pt3)
'(40 . 4.0)
)
)
;call the sub to make the text passing the point and value needed
(mtxt (rtos index 2 0) pt3)
)
Now to add a number, simply create the text you need there (middle center justified) at the point identified by PT3.
(defun mtxt ( mytext mypoint )
(entmake
(list
'(0 . "TEXT")
'(67 . 0)
'(100 . "AcDbText")
(cons 10 mypoint)
'(40 . 3.0)
(cons 1 mytext)
'(50 . 0.0)
'(41 . 1.0)
'(51 . 0.0)
'(71 . 0)
'(72 . 1)
(cons 11 mypoint)
'(73 . 2)
)
)
)
Enjoy ..