Jump to content

Numbering in AutoCAD 2007- is there automatic numbering?


Heidi1950

Recommended Posts

I often find myself copying numbers and then editing them sequentially. I can't use Excel or Word in this case, and the numbers are separate entities.

 

I'm using AutoCAD 2007.

 

For example:

 

1

1

1

1

 

 

I have to edit to

 

1

2

3

4

Link to comment
Share on other sites

a lisp program could do it.

 

a while ago i used to work for an exhibition company and a collegue wrote a lisp program that would allow you to sequentialy number trade booths just by clicking inside the box. it auto centered and everything.

 

I will try to find the lisp program. it was quiet handy.

 

G

Link to comment
Share on other sites

try the following, must have acad2000 and up, and the full version.

 

open notepad and copy and paste text into it

 

saveas Autonum.LSP and save it into your autocad support file

 

in Tools>Load Application find the Autonum.LSP file and drag it into your startup suite

 

on the command line, type in autonum and follow the prompts

 

enter 0 when asked for the x & y co ordinates to have your numbers snap to points. this is another one that jim wrote way back when, i couldnt find the newer version.

 

 

 

;;	Name:- Auto Numbering
;;	Written By:- Jimmy D
;;	Written on:- 17/5/1999

;;	Modified by:- GCP310
;;	Modified on:- 15/8/2006

;;	This program is for auto-numbering

 (defun C:autonum (/ pnt1 start rot count ang inc oldlayer)
   (setq ang 0 rot 0 count 0 inc 1 total 30000 OY 1500 OX 1500 ) 
   (princ " \n")
   (princ "Warning:   Please make sure you have set your text style\n")
   (princ "           and height before you continue. \n")   
   (setq oldlayer (getvar "clayer"))
   (setq oldsnap (getvar "osmode"))
   (setvar "osmode" 33)
   (if(not(tblsearch"layer" "DIMESION"))
     (command "-layer" "n" "DIMENSION" "c" "red" "DIMENSION" "" )
   )   ;; If
   (setvar "clayer" "DIMENSION") 
   (setq count (getint "Enter Starting No.: "))
   (if (null count) (setq start 1))
   (setq inc 1)   
   (setq ox (*(getdist "Select x offset: ")0.5))
   (if (null ox) (setq ox 0))
   (setq oy (*(getdist "Select y offset: ")0.5))
   (if (null oy) (setq oy 0))
   (setq th (getint "\nEnter text height:  "))
   (if (null th) (setq th 450))
   (while (<= count total)

;; Gets point for Number
     (setq pnt1 (getpoint "Pick Ref Point or Ecs to end: ")) 

;; Extracts x and y co-ordinates from pnt1
     (SETQ px1 (CAR pnt1))
     (SETQ ly1 (CDR pnt1))
     (SETQ py1 (CAR ly1))
     (SETQ px2 (+ px1 ox))                              
     (SETQ PY2 (+ py1 oy))
   
;; Creates new point from x and y
     (SETQ pnt2 (LIST px2 py2))		

;; Inserts text on to point
     (command "text" "s" "standard" "mc" pnt2 th 0 count)

;; Increases count in relation to the increment
     (setq count (+ count inc))                
   )   ;; While
 )   ;; Defunc

 

hope this helps

 

G

Edited by SLW210
Link to comment
Share on other sites

Guest Alan Cullen

Here's another one you could try....

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;; ERROR HANDLER ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun newerr (/ s)
(if ocmd (setvar "cmdecho" ocmd))
(if olderr (setq *error* olderr))

(if (/= s "Function cancelled")
 (if (= s "quit / exit abort")
  (princ)
  (princ (strcat "\nError: " s))
 )
 (princ "\n ERROR....CONSOLE BREAK....PREVIOUS DRAWING SETTINGS RESTORED")
)
;; (setq no nil ht nil pt nil)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;; MAIN PROGRAM ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:ptnos ()
(princ "\n AUTOMATIC SEQUENTIAL POINT NUMBERING - January 1998 -  Alan CULLEN")
(setq no (getint "\n Enter Starting Number : "))
(setq ht (getreal "\n Enter Text Height : "))
(setq pt T)
(while pt
 (setq notxt (itoa no))
 (setq pt (getpoint (strcat "\n Select midpoint for text ( "notxt" )   < exit > : ")))
 (if pt
  (progn
;;    (princ (strcat "E "(rtos (car pt))"  N "(rtos (cadr pt))))
   (command "TEXT" "j" "m" pt ht "90" no)
   (setq no (+ no 1))
  )
  (princ "\n Routine terminated normally by User")
 )
)
;; (setq no nil ht nil pt nil)
(setvar "CMDECHO" ocmd)
(setq *error* olderr)                          ;;Restore old error handler
(princ)
)

Link to comment
Share on other sites

  • 3 years later...
If the numbers were in a table you can use formulae to make each cell equal the one above +1.

 

Dave

 

 

ooooh me likes tables :lol:

Link to comment
Share on other sites

  • 3 years later...

I have one road drawing, its 500 meters. I need to put numbering 1 to 500 (such us 1 2 3 4 etc). every text have 1 meter incriment & 1 meter gap. Please help me.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...