That's pretty easy! But it takes some time, thinking and little effort. And the best thing about this task is that you would need to know very little of LISP programming to be able to do that all by yourself!
Revised workflow.
1) Get initial points using a (getcorner) function. (= do not draw a rectangle)
2) Calculate all the points you need from initial points. All means all - for extended corners, circle centers... all! You would need a (polar) function to use. Possibly also (car pnt), (cadr pnt) and (list x y z) functions to work with coordinates. Then you would need some loop, probably a (while) would be the best.
3) Generate all the linework using entmake functions. Minimum definitions are HERE . Or simply use (command "line"), but I wouldn't recommend that.
4) Calculate all points needed for dimensioning. Use (command "dimlinear" x y d). Turn off osnaps before! Points for extension line origins x a y you already have, so just a point for placing dimension text needed. Use a (polar) here as well.
So how many functions you need, 5?
5) come back if! you get stuck. Good luck!