LISP program needed

I need a reletively simply Lisp program, that will either increment, or decrement a number by a preset amount. Does anybody have this critter,
or know of its whereabouts?
TIA,
Dennis
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Dennis, its raelly simple and maybe you should try it by yourself (... learning much when doing this) ;-). The calculation is no problem: (setq new_number (+ old_number increment)) If you use "setq" to define old_number and increment befor calculating the new number you've got it. The question is: what do you want to do with the incremented number?
bob.at
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@utanet.at says...

These are 8 digit, digital addresses(about 400) thoughout several drawings. Each has to be incremented by 1. I need a fast way to do it,
Dennis
--
"Be suspicious of anybody who claims to know the truth."


Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
... which Bob just gave you. Use a little initiative. ___

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

No, I want somebody else to do all the work for me......

--



Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
HiHo; You might look at www.cadalyst.com and in the "get the code" section, search for "text". There are some search and replace with incremental changes, 11/1996 is one option. Then a script file could open each drawing and make the changes.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Take this and run with it. It increases by ONE (1) number. You'll have to adjust to suite your needs (I wanted to max out to 999... but you can modify that as you want - if needed). nmbr is the variable that gets increased by one.
I've cut out quite a bit of my routine just to give you the basics. 'nmbr' gets increased by ONE in the 'myLoop' Defun. I was inserting a symbol with an attribute and increasing it by one number each insert. So the myLoop defun kept on going until I cancelled the routine.
(Defun myLoop ( )
; insert Note (command "insert" "MSnote-nbr" newptx scbase scbase 0 nmbr) ; now set the note Number (setq nmbr (+ nmbr 1))
) ;Defun nextt
(initget (+ 1 2 4)) (setq nmbr (getreal "\nEnter the Starting Number (1 to 999): ")) (setq nmbr (fix nmbr))
(setq testx 1) ; a number for While loop (while (<= testx 9999) (myLoop)                                 ; Do your Loop part Here (setq testx (+ 1 testx)) ) ;while
Regards,
Bruce
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
says...

Do your Loop part Here

thank you,
Dennis
--


Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Download from http://xoomer.virgilio.it/lwcon/autolisp/numera.zip the autolisp function numera.lsp. This function increment, or decrement a number by a preset amount.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Dennis wrote:

I have got a program that will increase a number from an inputted start point, to an inputted sequence tos points as picked for each number.
Only increases though, although I haven't tried it with a minus sequence.
MMmmm worth looking at that
Bigjobs
Mail me for a copy if you want
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.