Oddly enough, when I loaded the AMORT.LSP today into a new drawing, the program would initialize but after "Select Longest Arc Segment:" the program terminates with no error report... I was able to get it to work yesterday, in a different drawing. The only change I actually made to the LSP is the "Select (long/short) Arc Segment:" was verbally backwards. Also I added a SETVAR for turning osnaps back on. Am I missing something?
[code];;__________________________________________Amort.lsp________________________________________________;;(vl-load-com);; get bulge radius;; math by Juergen Menzi(defun get-radii (p1 p2 bulge)(abs (/ (distance p1 p2) 2 (sin (/ (* 4 (atan (abs bulge))) 2)))));;--------------------------------------;;(defun ang-tangent (curve pnt)(angle'(0 0 0)(trans(vlax-curve-getFirstDerivcurve(vlax-curve-getParamAtPoint curve (trans (vlax-curve-getClosestPointTo curve pnt) 1 0)))0 1 T )));;--------------------------------------;;(defun get-segments (en pnt / par)(setq par (vlax-curve-getParamAtPointen(vlax-curve-getClosestPointTo en pnt)))(list (vlax-curve-getPointAtParam en (fix par))(vlax-curve-getPointAtParam en (1+ (fix par)))));;----------------------- main part ----------------------------;;(defun C:Amort(/ *error* adoc ang clay curve da en gap i joint leg num p1 p1e p2 par pe1 pe2 pn ps1 ps2 rad segs sset step stleg th)(defun *error* (msg)(vla-endundomark (vla-get-activedocument(vlax-get-acad-object)))(cond ((or (not msg)(member msg '("console break" "Function cancelled" "quit / exit abort"))))((princ (strcat "\nError: " msg))))(setvar "nomutt" 0)(if clay (setvar "clayer" clay))(princ))(setq adoc (vla-get-activedocument(vlax-get-acad-object)))(vla-startundomark adoc )(setq clay (getvar "clayer"))(setvar "clayer" "Mortar");