TEXT PROMPT for Dtext
When using basic dtext, acad has a small text prompt symbol shown in the drawing before you start typing. This is helpful to let you know if you are still in the text command or if using multiple returns to put row spaces between lines of text. Not having the prompt was causing me to often enter a new command while still in dtext mode.
This works pretty well to mimic the acad interface.
stdnote command sets textsize based on LTScale, and needs a style textm to exist.
(defun tprompt ( p1 tsz / p2 p3 p4 p5 p6)
(setq p2 (polar p1 0 (/ tsz 4.0))
p3 (polar p1 0 (/ tsz 8.0))
p4 (polar p3 (/ PI 2.0) tsz)
p5 (polar p4 (* PI -1.0) (/ tsz 8.0))
p6 (polar p5 0 (/ tsz 4.0))
)
(grdraw p1 p2 5)(grdraw p3 p4 5)(grdraw p5 p6 5)
)
(defun c:stdnote ( / tsz sty p1)
(setq tsz (* 0.1875 (getvar "ltscale")) sty "textm")
(princ "\nStandard Note Text ")
(command "-style" sty "" 0 "" "" "" "" ""
"dtext" (setq p1 (getpoint)) )(tprompt p1 tsz) (command tsz 0 pause)
(setq p1 (polar p1 (* PI 1.5) (* tsz 1.666)))
(while (/= (getvar 'cmdactive) 0)
(tprompt p1 tsz)(command pause)
(setq p1 (polar p1 (* PI 1.5) (* tsz 1.666)))
) (command "redraw")(PRINC)
)
This works pretty well to mimic the acad interface.
stdnote command sets textsize based on LTScale, and needs a style textm to exist.
(defun tprompt ( p1 tsz / p2 p3 p4 p5 p6)
(setq p2 (polar p1 0 (/ tsz 4.0))
p3 (polar p1 0 (/ tsz 8.0))
p4 (polar p3 (/ PI 2.0) tsz)
p5 (polar p4 (* PI -1.0) (/ tsz 8.0))
p6 (polar p5 0 (/ tsz 4.0))
)
(grdraw p1 p2 5)(grdraw p3 p4 5)(grdraw p5 p6 5)
)
(defun c:stdnote ( / tsz sty p1)
(setq tsz (* 0.1875 (getvar "ltscale")) sty "textm")
(princ "\nStandard Note Text ")
(command "-style" sty "" 0 "" "" "" "" ""
"dtext" (setq p1 (getpoint)) )(tprompt p1 tsz) (command tsz 0 pause)
(setq p1 (polar p1 (* PI 1.5) (* tsz 1.666)))
(while (/= (getvar 'cmdactive) 0)
(tprompt p1 tsz)(command pause)
(setq p1 (polar p1 (* PI 1.5) (* tsz 1.666)))
) (command "redraw")(PRINC)
)
0