A few things you need to look into in the future. Localize your variables; saving & restoring system variables you modify in your code; and use less cryptic variable names.
Now to your code. I didn't do much other than adjusting the corners of your arcs at the top of your door.
Add these two functions to either within your routine (and localize their names) or add them to your toolbox (you may need them in the future).
Code:
(defun getCurveIntersection (objCurve 3DPoint lstVector /) ;_ No variables to localize for this routine
(if (= (type objCurve) 'ENAME) ;_ Check if value from the arguement objCurve is an entity and not a vla-object
(setq objCurve (vlax-ename->vla-object objCurve)) ;_ Convert to vla-object
)
(if (= (type objCurve) 'VLA-OBJECT) ;_ verify we are dealing with a vla-object
(vlax-curve-getClosestPointToProjection
objCurve
3DPoint
lstVector
) ;_ get 3D point of projection
nil ;_ return nil if not working with a vla-object
)
)
Code:
(defun setCurveAngles (objCurve pntStart pntEnd /) ;_ No variables to localize for this routine
(if (= (type objCurve) 'ENAME) ;_ Check if value from the arguement objCurve is an entity and not a vla-object
(setq objCurve (vlax-ename->vla-object objCurve)) ;_ convert to vla-object
)
(if (= (type objCurve) 'VLA-OBJECT) ;_ verify we are dealing with a vla-object
(progn
(vla-put-StartAngle ;_ adjust start angle of arc
objCurve
(angle (vlax-safearray->list
(vlax-variant-value (vla-get-center objCurve))
)
pntStart
)
)
(vla-put-EndAngle ;_ adjust end angle of arc
objCurve
(angle (vlax-safearray->list
(vlax-variant-value (vla-get-center objCurve))
)
pntEnd
)
)
)
nil ;_return nil if not working with vla-object
)
)
Now that you have these two functions, after you draw your first arc add this code:
Code:
(setq entArcOuter (entlast))
(command "offset" 2.0 entArcOuter tamm2 "")
(setq entArcInner (entlast))
(command "offset" 0.625 entArcOuter tamm "")
(setq entArcMiddle (entlast))
(setq tamb (setq pntLeftMiddleArc (getCurveIntersection entArcMiddle tamb '(0.0 1.0 0.0)))
tdmb (setq pntRightMiddleArc (getCurveIntersection entArcMiddle tdmb '(0.0 1.0 0.0)))
tamc (setq pntLeftInnerArc (getCurveIntersection entArcInner tamc '(0.0 1.0 0.0)))
tdmc (setq pntRightInnerArc (getCurveIntersection entArcInner tdmc '(0.0 1.0 0.0)))
)
(setCurveAngles entArcMiddle pntRightMiddleArc pntLeftMiddleArc)
(setCurveAngles entArcInner pntRightInnerArc pntLeftInnerArc)
You can also remove the extra double quotes at the end of your code to draw an arc. There is no need for it.