Jump to content
nil28

change the many text at once

Recommended Posts

nil28

I have a drawing in which many different text are there. I want to change some of the text to one text in one selection. Is it possible? Please refer attached file more clarification.

Thanks in advance.

same text.dwg

Share this post


Link to post
Share on other sites
eldon

You don't need lisp to do that. Just select them all, and in the Properties dialogue box, change the Contents to what you require.

  • Thanks 1

Share this post


Link to post
Share on other sites
gS7

Try bellow Codes

(defun c:Test (/ ss str en i )
  (if
    (setq ss (ssget '((0 . "TEXT"))))
     (progn
       (setq str (getstring "\nEnter Final Text Name:"))
       (repeat (setq i (sslength ss))
	 (setq en (vlax-ename->vla-object (ssname ss (setq i (1- i)))))
	 (if (vlax-write-enabled-p en)
	   (vlax-put-property en 'Textstring str)
	 )
       )
     )
  )
  (princ)
)

 

Share this post


Link to post
Share on other sites
nil28

Thanks a lot for the code...it works!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×