GJBarron Posted June 21, 2010 Share Posted June 21, 2010 is there any way you can number spaces so they update automatically for example if you delete one? ie 1 2 3 4 5 you remove space 3 and it renumbers 1 2 3 4 thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 21, 2010 Share Posted June 21, 2010 Are you using LT as your profile states? Or do you have access to the full version? I was thinking either FIELDS or Reactors - but in both situations the program would be quite complex. Quote Link to comment Share on other sites More sharing options...
GJBarron Posted June 21, 2010 Author Share Posted June 21, 2010 Are you using LT as your profile states? Or do you have access to the full version? I was thinking either FIELDS or Reactors - but in both situations the program would be quite complex. I can gain access to autocad full. Quote Link to comment Share on other sites More sharing options...
fixo Posted June 21, 2010 Share Posted June 21, 2010 The following code will not update automatically as you wanted be but you can do it by selection these texts on screen (probably you need to add other selection otions to the filter list say like textstle, textsize, layer etc Sorry I haven't have a time to test it (defun c:renum (/ elist entlist init sset) (command "._zoom" "_e") (if (setq sset (ssget "X" (list (cons 0 "*TEXT") ;<-- tetx,mtext (cons 1 "#,##,###,####") ;<-- select integer numeric text only like: 1,22,333,4444 (cons 410 (getvar "ctab"));<-- current tab )) ) (progn (setq init (1- (atoi (cdr (assoc 1 (entget (car (setq entlist (vl-sort (vl-remove-if 'listp (mapcar 'cadr (ssnamex sset))) (function (lambda (a b) (< (cdr (assoc 1 (entget a))) (cdr (assoc 1 (entget b)))))) )))))) ) ) ) (foreach en entlist (setq elist (entget en)) (princ (strcat "\n ===>>> Number " (cdr (assoc 1 (entget en))) " was replaced with " (itoa (1+ init))) ) (entmod (subst (cons 1 (itoa (setq init (1+ init)))) (assoc 1 elist) elist)) ) ) ) (command "._zoom" "_p") (princ) ) ~'J'~ Quote Link to comment Share on other sites More sharing options...
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.