How To set AutoCAD Text Width Factor with Script

So, you’re writing a script for AutoCAD and you’re going to write some text. That’s great, you know how to do it. Even if you don’t you can follow along in the command line and figure it out.

Now, what if you wanted to control the Width Factor, or back it upside down or backwards? This is under the STYLE command. Once you know that It’s relatively simple to follow along in the command line but I’ll enumerate here.

-style Font Style Height WidthFactor Angle Backwards UpsideDown Vertical
To write some Standard text at the origin, with 80% width factor I would use it like this.

-style Standard Simplex 0.125 0.8 0 N N N
;Set the Style
-text 0,0,0 .125 0 Hello World
;Write your text
-style Standard Simplex 0.125 1 0 N N N
;Good practice to set the style back

I hope this has helped you. Good luck in your efforts!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.