Add Incremental Value to Numerical Text

Add Incremental Value to Numerical Text

codee
Advocate Advocate
1,337 Views
6 Replies
Message 1 of 7

Add Incremental Value to Numerical Text

codee
Advocate
Advocate

There are posts on this forum about this. Not one LISP routine I have found works. 

Is there a routine where I can select multiple numerical text and then enter a positive or negative number to add to them, and then set the precision, and have it replace the original text?

 

Thank you if you know of one that you can share.

0 Likes
Accepted solutions (1)
1,338 Views
6 Replies
Replies (6)
Message 2 of 7

pendean
Community Legend
Community Legend
Post examples please.


0 Likes
Message 3 of 7

ВeekeeCZ
Consultant
Consultant

THIS NumInTxt routine by CADStudio might be too complex for your task, but it definitely works.

 

See the example HERE

Message 4 of 7

codee
Advocate
Advocate

Example... I have text "5.50" and "4.75" I want to select both of them and add 1.1 to both so that I have "6.60" and "5.85"

0 Likes
Message 5 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

You don't say which ones you've tried.  Did they include EDITNUM.lsp from @john.uhden , >here<?  In quickie trial, it seems to honor the precision of each original number, but I think if you want all to be at the same precision whatever the original had, you could probably just change all instances of the  |prec  and  |cprec  and possibly  |dec  variables [the precision arguments in (rtos) functions generating the new text content] to your desired number of decimal places.

Kent Cooper, AIA
0 Likes
Message 6 of 7

john.uhden
Mentor
Mentor
Thanks, Kent.
That's a great way of providing an explanation without jerking around with
code (by either you or me).

John F. Uhden

0 Likes
Message 7 of 7

3wood
Advisor
Advisor

You can also try ALTEXT.

altext1.JPG

0 Likes