leonucadomi Posted 15 hours ago Posted 15 hours ago hello: Now I find myself in another situation. I have an attdef group I would like to be able to make a selection in a window and that the numbering is increased or decreased by a desired amount. maintaining the numbering format with zeros examplse (001,020,999) example: any help you can provide, thanks. Drawing2.dwg Quote
rlx Posted 13 hours ago Posted 13 hours ago Load VT , start with VT (or C:VT) Click on one of the attdef's , you get the main dialog Click on setup (bottom right) and change difference to 5 , click on ok to return to main dialog Finaly click on Renum and select all attdefs , enter, done... VT uses grread in a constant loop so exit with escape, cancel or spacebar that will get you in quick menu and you can escape / Quit / cancel from there. Not all buttons will work because some are company specific like revision but for now it should get you what you need. VT.LSP 2 1 Quote
BIGAL Posted 7 hours ago Posted 7 hours ago (edited) This post is like option 2 of this post. Is there an option 3 ? Will answer last question in other post. Suggest keep all in one post. Give this a try does both requests. (defun c:addval ( / lst lst2 att cnt lst3) (setq inc (getreal "\nEnter increment + or - ")) (setq ss (ssget '((0 . "TEXT,ATTDEF")))) (setq lst '() tnum 0 tatt 0) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (1- x))))) (setq objname (vlax-get obj 'objectname)) (if (= objname "AcDbText") (progn (vlax-put obj 'textstring (rtos (+ (atof (vlax-get obj 'textstring)) inc) 2 0)) (setq tnum (1+ tnum)) ) (progn (vlax-put obj 'tagstring (rtos (+ (atof (vlax-get obj 'tagstring)) inc) 2 0)) (setq tatt (1+ tatt)) ) ) ) (alert (strcat (rtos tnum 2 0) " text changed \n" (rtos tatt 2 0) " tags Changed")) (princ) ) If you introduce more objects may need a cond rather than using IF. Edited 3 hours ago by BIGAL Quote
Recommended Posts
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.