Author Topic: change the text height of the Current text style  (Read 2584 times)

0 Members and 1 Guest are viewing this topic.

Humbertogo

  • Guest
change the text height of the Current text style
« on: December 05, 2007, 12:33:19 PM »
how can i change the text height of the Current text style lisp
at the begging of the function and put it bak at the end
like a variable

T.Willey

  • Needs a day job
  • Posts: 5251
Re: change the text height of the Current text style
« Reply #1 on: December 05, 2007, 12:34:47 PM »
how can i change the text height of the Current text style lisp
at the begging of the function and put it bak at the end
like a variable
Grab the text style definition, either with 'tblobjname' or get the style collection (ActiveX).  Then just save the old height, and set it to 0.0, then after put it back.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7533
Re: change the text height of the Current text style
« Reply #2 on: December 05, 2007, 12:38:33 PM »
Something like this:

Code: [Select]
(if (setq sty (tblobjname "style" "stylename"))
  (progn
    (setq sty (vlax-ename->vla-object sty))
    (vlax-get-property sty 'height)
    (vlax-put-property sty 'height 0.0)
  )
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Humbertogo

  • Guest
Re: change the text height of the Current text style
« Reply #3 on: December 05, 2007, 02:34:32 PM »
Thanks