Jump to content

Changing the size of the Mtext for 0001?


rodrigo_sjc_sp

Recommended Posts

I need a code or help you change the size (Text Height) of all MText to 0.01

 

On one condition the word (COLUMNS-SALE) must contain the property contents

 

Some Help ?

Link to comment
Share on other sites

The text , Sample COLUMNS-SALE=1000

 

I have same Mtext sample

 

 

Mtext COLUMNS-SALE = 1000m2

Mtext COLUMNS-SALE2 = 1000m2

Mtext COLUMNS-SALE =1000m2

Mtext COLUMNS-SALE2=1000m2

 

If in the text of Mtext contain the text COLUMNS-SALE , change the size to 0.01

 

Using Lisp;

Link to comment
Share on other sites

Things like this ... ?

 

(defun c:TesT (/ sel)
 (if (ssget "_:L" '((0 . "MTEXT") (1 . "*COLUMNS-SALE*")))
   (progn (vlax-for mt (setq sel (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object))))
            (vla-put-height mt 0.01)
          )
          (vla-delete sel)
   )
 )
 (princ)
)
(vl-load-com)

Edited by Tharwat
Forgot to localize the variable
Link to comment
Share on other sites

Tharwat ,

 

 

That was it, just wanted to know how I can modify to

not need to select the MText, ie to make it all MText?

 

The Cad is asking to me select an object.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...