+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Forum Newbie
    Using
    not specified
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    3

    Default Numbering in AutoCAD 2007- is there automatic numbering?

    Registered forum members do not see this ad.

    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

  2. #2
    Super Member gcp310's Avatar
    Using
    not applicable
    Join Date
    Dec 2002
    Location
    physicaly - Australia, mentaly - Another Planet
    Posts
    696

    Default

    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

  3. #3
    Super Member gcp310's Avatar
    Using
    not applicable
    Join Date
    Dec 2002
    Location
    physicaly - Australia, mentaly - Another Planet
    Posts
    696

    Default

    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

  4. #4
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

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

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

  5. #5
    Senior Member Ako's Avatar
    Using
    AutoCAD 2007
    Join Date
    Mar 2006
    Location
    Warrington UK
    Posts
    310

    Default

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

    Dave

  6. #6
    Full Member
    Computer Details
    mvrcad's Computer Details
    Operating System:
    windows 7
    Discipline
    Mechanical
    mvrcad's Discipline Details
    Occupation
    Resources
    Discipline
    Mechanical
    Details
    Mechanical Draftsman
    Using
    AutoCAD 2012
    Join Date
    Nov 2009
    Location
    Australia
    Posts
    73

    Default

    Thanks Guys And Girls Have Saved Some Time At Work Using These Lisps, Cheers

  7. #7
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2011
    Join Date
    Apr 2008
    Posts
    6,012
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  8. #8
    Super Member Ryder76's Avatar
    Computer Details
    Ryder76's Computer Details
    Operating System:
    Windows 7
    Computer:
    Dell T7500
    Discipline
    See details...
    Ryder76's Discipline Details
    Occupation
    Electrical Designer - Oil & Gas
    Discipline
    See details below.
    Details
    Subsea Solutions
    Using
    AutoCAD 2010
    Join Date
    May 2009
    Location
    Houston, Texas
    Posts
    570

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Ako View Post
    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
    "Great spirits have always encountered violent opposition from mediocre minds." - Albert Einstein

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts