TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Pukenzz on October 30, 2018, 03:31:35 PM

Title: Textsize
Post by: Pukenzz on October 30, 2018, 03:31:35 PM
I have 3 different dimension styles…
CEI-ARCHITECTURAL
CEI-FRACTIONAL
CEI-DECIMAL
This portion of lisp will change the dimscale…
(wcmatch (strcase (getvar 'dimstyle)) "*CEI*")
       (setvar 'dimscale 1)(setvar 'textsize 0.100)
I rewrite it for 16 different buttons that correspond to the 16 different dimscales I want to be able to use. I have that all working fine.
Now I’m looking for help on the code that would be associated to make it so that I can change all my textsize of all my textstyles at the same time.  I have 3 text styles..

CEI-DIM
CEI-VIEW
CEI-NOTE
Changing textsize only changes the textstlye that is current.  I want to be able to change all 3 at the same time regardless of which is active.

Thanks in advance
Title: Re: Textsize
Post by: Dlanor on October 30, 2018, 06:26:27 PM
Try this

Code - Auto/Visual Lisp: [Select]
  1. (defun c:csh ( / c_doc c_styles s_lst th)
  2.  
  3.         c_styles (vla-get-textstyles c_doc)
  4.         s_lst (list "CEI-DIM" "CEI-VIEW" "CEI-NOTE")
  5.   );end_setq
  6.   (initget (+ 1 2 4))
  7.   (setq th (getreal "\nEnter New Text Height for TextStyles : "))
  8.   (setvar 'textsize th)
  9.   (foreach style s_lst
  10.     (vlax-put-property (vla-item c_styles style) 'lastheight th)
  11.   );end_foreach
  12. );end_defun
  13.