To anyone who can help,
I have around 700 pieces of dtext that all need to have their values raised by 10 is there any easy way of doing this?
Thanks in advance,
Solved! Go to Solution.
>> is there any easy way of doing this?
If development of such tool is easy, then yes, there is an easy way getting that done
If you describe more about your type of text (DTEXT, MTEXT, dimension-text, block-attribute-text, LEADER-text, ...) and do these text-objects have some prefix or suffix, .... or when you upload a drawing maybe someone does it for you.
- alfred -
Please try attached routine.
Settings as below:
You can search from left or right depending on what text string structure it is.
The text was a mix of DTEXT and MTEXT with 2 decimal places, all the text had numerical values only. I found a lisp that ended up doing what i wanted.
Here it is for future reference. Thanks for replying.
(defun c:addn ( / ss)
(if (and (setq ss (ssget "X" (list (cons 0 "*text"))))
(setq amt (getreal "\nPlease type the amount you would like to add: ")))
(mapcar '(lambda (z) (vla-put-textstring z (rtos (+ (atof (vla-get-textstring z)) amt) 2 3)))
(mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))))
EDIT: I missed that response ALTEXT is perfect! thank you so much.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register