Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can a Lisp

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
1bdchristian
382 Views, 4 Replies

Can a Lisp

I there a way to change all the text styles in a drawing to 0.8 width globally. I would like to use entmod so I do not have to change each one. Can it be done and how or has anyone developed a lisp to do so.

 

thansk Byron

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: 1bdchristian


@1bdchristian wrote:

I there a way to change all the text styles in a drawing to 0.8 width globally. I would like to use entmod so I do not have to change each one. ....


A clarification:  do you want to change the defined width factor in each Text Style definition [as implied by the wording "change all the text styles"], or to force an assigned width for each Text entity [as implied by the second half of the sentence and assumed by MetroVancouverDrafting before they apparently deleted their message]?  Are you also interested in Mtext?  Attributes?

Kent Cooper, AIA
Message 3 of 5
1bdchristian
in reply to: Kent1Cooper

I would like to change all the text styles in the drawing to 0.8 with out having to go to the styles dialog and change each one.

Message 4 of 5
Kent1Cooper
in reply to: 1bdchristian


@1bdchristian wrote:

I would like to change all the text styles in the drawing to 0.8 with out having to go to the styles dialog and change each one.


Give this a try:

(while
  (setq sname (cdr (assoc 2 (tblnext "style" (not sname)))))
  (if (not (wcmatch sname "*|*")); [not Xref-dependent]
    (progn
      (setq sdata (entget (tblobjname "style" sname)))
      (entmod (subst '(41 . 0.8) (assoc 41 sdata) sdata))
    ); progn
  ); if
); while

 

It won't change the width factor of Text entities already in the drawing, but code could be included to handle that part of it.  Or you can use the Qselect method for that, or grab everything in the drawing with a big crossing window, and in the Properties box, narrow it down to only Text entities and change their width factor there.

Kent Cooper, AIA
Message 5 of 5
1bdchristian
in reply to: Kent1Cooper

Excellent - just what I needed. - thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost