t6nis143 Posted June 26, 2014 Share Posted June 26, 2014 Hi! Is there a way to make autocad to autoselect numbers in correct order (from 501 to 530 ie.)? Selecting them by single clicks takes too much time. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
dbroada Posted June 26, 2014 Share Posted June 26, 2014 what will you be doing once you have selected a number? Quote Link to comment Share on other sites More sharing options...
t6nis143 Posted June 26, 2014 Author Share Posted June 26, 2014 I want the software to autoselect them by order, so I could use TCOUNT and change the numbers. (for example: 401...450 to 501...550) Selecting each of them by single click takes too much time. Is there any way to autoselect them by order? Quote Link to comment Share on other sites More sharing options...
dbroada Posted June 26, 2014 Share Posted June 26, 2014 I have never used TCOUNT but looking at the command I doubt that it is possible to pre select the order. However if you can be more specific about what you need a custom LISP could be written (not by me) that would combine the selection and the incremented text. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 26, 2014 Share Posted June 26, 2014 Using ssget in a lisp you can search for all the numbers in one go if as I have guessed they are blocks, then say filter it down to your range use, a VLsort then loop through them to change the numbers. Phew not that hard. Do you want the numbers to be correct + 1 for each or just add a fixed value? Fixed is real easy. No sample dwg so please post including answer to question line above. Quote Link to comment Share on other sites More sharing options...
t6nis143 Posted June 26, 2014 Author Share Posted June 26, 2014 Using ssget in a lisp you can search for all the numbers in one go if as I have guessed they are blocks, then say filter it down to your range use, a VLsort then loop through them to change the numbers. Phew not that hard. Do you want the numbers to be correct + 1 for each or just add a fixed value? Fixed is real easy. No sample dwg so please post including answer to question line above. Im not sure what you mean by that, but yes I need the numbers to always increase by +1, but the value of the numbers depend on which houseplan im using it on. (Sorry, my english is kind of rusty) In example, if you look at the screenshot above, I'd like autocad to select the numbers in the circle only, in increasing order, so I could use TCOUNT function later or put this function in a lisp. (Using TCOUNT assumes you single-select object in certain order and it will number them in the same exact order) Quote Link to comment Share on other sites More sharing options...
eldon Posted June 26, 2014 Share Posted June 26, 2014 Perhaps you could use a Text Calculator by Lee Mac Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 26, 2014 Share Posted June 26, 2014 Are you talking about single line texts ? Quote Link to comment Share on other sites More sharing options...
t6nis143 Posted June 26, 2014 Author Share Posted June 26, 2014 Yes, single line Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 26, 2014 Share Posted June 26, 2014 Yes, single line Try this and let me know how you'd get on with it . (defun c:test (/ n1 n2 sad ss i sn e st) ;; Tharwat 26.June.2014 ;; (if (and (setq n1 (getint "\n Specify First number in order [smallest] :")) (setq n2 (getint "\n Specify Second number in order [biggest] :")) (princ "\n Select texts ...") (setq sad (ssadd) ss (ssget "_:L" '((0 . "TEXT") (1 . "*#*"))) ) ) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i))) e (entget sn) st (cdr (assoc 1 e)) ) (if (and (numberp (setq n (read st))) (< (1- n1) n (1+ n2))) (ssadd sn sad) ) ) ) (sssetfirst nil sad) (princ) ) 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.