Function fails without (Alert "we got here")

Started by donnieworld · 2023-05-17 07:45 UTC · 1 replies · SMF topic #2860

I have a simple function that is failing in BricsCAD if I get rid of the (alert "we got here") line. If I leave this in, the function runs as expected? If I replace it with (princ) the function fails?

Pick start point >
;
; error : during LISP function [c:FastSegmentLabels/frmMain/bArc#OnClicked] invoke from BRX/SDS interface,

(defun c:FastSegmentLabels/frmMain/bArc#OnClicked
( / pStart pCenter pEnd lStyles sText oTArc)

  (princ (strcat
"\nFSL-I: Arcs are defined by the start point, center point, and"
"\nend point. Arcs are drawn counter clock-wise."
))

(alert "we got here")

(while
(setq pStart (getpoint "\nPick start point > "))
(setq pCenter (getpoint pStart "\nPick center point > "))
(setq pEnd (getpoint pCenter "\nPick end point > "))
(setq lStyles (FSL:SetStyles))
(setq oTArc (vla-addarc mspace pCenter (distance pStart pCenter) (angle pCenter pStart) (angle pCenter pEnd)))
(setq sText (FSL:AddSegmentLabel (vlax-vla-object->ename oTArc) (nth 0 lStyles) (nth 1 lStyles)))
(vla-delete oTArc)
)

)

>>>>>>>> Please help!
Hello, is it a modal form or a modeless form?
You cannot get access to AutoCAD within an event from a modal form.
Regards, Fred