Can anyone assist in helping me adjust our LISP

We currently prepare subdivision plans which require a number of scribed bearings and distances on a plan to be offset neatly from a line at a set offset. Currently we manual use the distance lisp below and then manually move the distance to tidy up the plan, then we use the bearing lisp and complete the same task to create our plan.

We are hoping to merge or recreate our LISP so that when we click from one end point on a line to another endpoint the LISP will create a distance with the bearing below at a set height, style and offset from the line based on the current scale of the drawing. Can anyone assist as we have little knowledge of LISP writing.

Bearing LISP
(defun c:b1-2015()
(setq pt (getpoint "choose lot centre:"))
(command "-boundary" pt "")
(command "area" "e" "l")
(command "-layer" "m" "area" "c" "1" "" "")
(setq a (getvar "area"))
(setq b (* 4 (getvar "dimscale")))
(command "text" "s" "arial" "j" "m" pt b 90 (strcat (rtos a 2 0) "m%%178"))

)


Distance (defun c:d2-2002() (command "osnap" "end")
(setq pt1 (getpoint "1st end:"))
(setvar "lastpoint" pt1)
(setq pt2 (getpoint "2nd end:"))
(command "osnap" "")
(setq dist (rtos (distance pt1 pt2) 2 1))
(setq ang (- 90.0 (/ (* (angle pt1 pt2) 180.0) pi)))
(setq pt1 (getpoint "mid point of text:"))
(setq b (* 3 (getvar "dimscale")))
(command "-layer" "m" "DISTANCE" "c" "3" "" "")
(command "text" "m" pt1 b ang dist)
(princ)
)