lisp routine

Does anyone have any info on where to find a Lisp routine that will place a text Number everywhere I click and automatically increment the value for the next one.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
No I don't but I do have a routine that will increment a series of text digits by 1 starting at a typed number. R. Wink

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I have one on my site that will do that but the number has to be the only attribute in a block (not text). You can pick any interval, starting number, and alpha-numeric prefix. It's called bseq.lsp , for Block SEQuencer.
--


MichaelB
www.michaelbulatovich.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Try the routine attached.
regards, joar
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks to all the replies, however my news server is showing "no" attachment.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Try pasting the following into a text document, then save as "your file name.lsp", then in ACAD at the "Command:" prompt type in: (load "your file name") , then type in: nmbr
;;;;begin code by Jeff Mishler to insert ;;;;a number and increment the value to insert ;;;;the next number
(defun c:nmbr (/ new_num) (if (not *last_num*)(setq *last_num* 1)) (cond ((setq new_num (getint (strcat "\nNumber to start numbering with (" (itoa *last_num*) ") : ")))(start_lbl)) ((setq new_num *last_num*)(start_lbl)) ) (princ) ) (defun start_lbl (/ CURHGT CURSTYL INSPT) (setq curStyl (tblsearch "style" (getvar "textstyle"))) (if (= 0 (cdr (assoc 40 curStyl))) (progn (initget 7) (setq curHgt (getreal "\nEnter a height for the text: ")) ) (setq curhgt (cdr (assoc 40 curStyl))) ) (while (setq insPt (getpoint "\nSelect next number Insertion Point: ")) (entmake (list '(0 . "TEXT") '(100 . "AcDbEntity") (cons 8 (getvar "clayer")) '(100 . "AcDbText") (cons 10 insPt) (cons 40 curhgt) (cons 1 (itoa new_num)) '(50 . 0) (cons 7 (getvar "textstyle")) ) ) (setq new_num (1+ new_num) *last_num* new_num ) ) ) ;;;;;end code
HTH, Jeff

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hello This is working perfekt but how to make it remember the last number after closing and opening acad and current drawing??
Peeter

file
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
LISP variables aren't saved in drawing files. But you have a number of options:
(1) Set one of the user variables (USERRn, USERIn) to the the value contained in *last_num* before you exit the routine; (2) Attach the value to an object in the drawing as XDATA; (3) Use a catalog. (3) Write a little temporary file containing the saved value; (4) Set an environment variable in the registry.
You should be able to find details on most of these options in HELP (Customization Guide). ___

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Take a look at their website http://xoomer.virgilio.it/lwcon/autolisp/autolisp.htm and download the anx.lsp function.
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.