Can't set text size in command

Can't set text size in command

davidlanesmith673
Enthusiast Enthusiast
549 Views
3 Replies
Message 1 of 4

Can't set text size in command

davidlanesmith673
Enthusiast
Enthusiast

I have this line in my AutoLISP code where pnt2 is a point, textH is the height, textA is the angle, and num is the output. In one drawing this works fine, but when I used this in another drawing, it wouldn't use textH to set the height, but rather would use a default height, use textH as the angle, and print out textA, ignoring num. How do I ensure that each argument is setting the right parameter.

 

(command "._text" pnt2 textH textA num)

0 Likes
Accepted solutions (1)
550 Views
3 Replies
Replies (3)
Message 2 of 4

pbejse
Mentor
Mentor
Accepted solution

@davidlanesmith673 wrote:

, but when I used this in another drawing, it wouldn't use textH to set the height, but rather would use a default height, use textH as the angle, and print out textA, ignoring num. How do I ensure that each argument is setting the right parameter.


 

Check your current TEXTSTYLE <---  text height is set to a specific height the prompt for height is negated

 

 

 

0 Likes
Message 3 of 4

davidlanesmith673
Enthusiast
Enthusiast
I set the height to zero and now it's working, thanks!!
0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor

A entmake will force height try it

(defun Text (pt hgt str)
 (entmakex (list (cons 0 "TEXT")
                 (cons 10  pt)
                 (cons 40 hgt)
                 (cons 1  str))))
0 Likes