Jump to content

Changing the size of the Mtext for 0001?


Recommended Posts

Posted

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 ?

Posted

 

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

 

 

What you mean by contain the property contents ?

Posted

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;

Posted (edited)

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
Posted

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.

Posted
Tharwat ,

 

The Cad is asking to me select an object.

 

Replace this ...

 

"_:L"

 

With this ..

 

"_x"

 

But be careful to have all layers on .

Posted

Thanks you Teacher

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...