Search the Community
Showing results for tags 'integer'.
-
Put mass selected integers in ascending order starting from a given integer
tsotzo posted a topic in AutoLISP, Visual LISP & DCL
Hello, Let's say we have a group of integers as text in dwg. How would we put them in in ascending order by one(+1) starting from a given integer? Let me give an example to make it clear. Let's say we have the texts 1 2 5 5 5 8 9 11 11 15 and the given start integer is 6. We select them all together and the range in selection set is random. Let's say 5 2 8 15 1 5 5 11 9 11. Now, we want to put them in ascending order by one starting from number 6 replacing the "old" range with the new. In the end we must have this: 6 7 8 8 8 9 10 11 11 12. That is 6(in place of 1), 7(in place of 2), 8(5), 8(5), 8(5), 9(, 10(9), 11(11), 11(11), 12(15). I hope it is clear. How would we do that in an efficient way? Thank you in advance, Kostas -
This lisp routine is to set decimal digits after a comma in any integer to 2 digit for any set of entries even in term of text ,, how to avoid the appearance of 0 .. ( ex : 25.456 ~25.460 , 25.322~25.320 ) last 0 isn't preferable ..