Just to confirm the comments regarding textHeight ..
This is the result of a command call when using a textStyle which has height set to 0.0.
The command asks you to confirm the height, using the current global system variable "TEXTSIZE" as the default.
This is the way you called the text command in your original code, so you have included a "" after the insertion point prompt to accept the offered default.
Command: text
Current text style: "NORMAL" Text height: 50.00
Specify start point of text or [Justify/Style]: j
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]: m
Specify middle point of text:
Specify height <35.00>:
Specify rotation angle of text <0.000>:
Now if we change the TextStyle ...
Command: textstyle
Enter new value for TEXTSTYLE <"NORMAL">: T35
This is the result of a command call when using a textStyle which has height set to a value other than 0.
Notice that there is NO prompt for TextHeight ..
Command: text
Current text style: "T35" Text height: 35.00
Specify start point of text or [Justify/Style]: j
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]: m
Specify middle point of text:
Specify rotation angle of text <0.000>:
It appears that the particular drawing you are running the code in has height set, while your "TEXT" command does NOT expect that to be the case.
You could use and build on Michaels excellent solution,
or ; ensure the correct text style is set prior to running your code
or ; set the style as part of the TEXT command code, ie
;;-----------------------------------------
(DEFUN _drawtext (selectionpoint rotationangle /)
(COMMAND "text"
"Style"
"MySuperDuperTextStyleWithZeroHeight"
"j"
"m"
selectionpoint
""
(_rtd (_settextangle rotationangle))
textstring
)
(ENTLAST)
)
;;-----------------------------------------
or ;
;;-----------------------------------------
(DEFUN _drawtext (selectionpoint rotationangle /)
(COMMAND "text"
"Style"
"MySuperDuperTextStyleWithFixedHeight"
"j"
"m"
selectionpoint
;; "" <-- not needed in this case
(_rtd (_settextangle rotationangle))
textstring
)
(ENTLAST)
)
;;-----------------------------------------