Heidi1950 发表于 2022-7-5 23:11:24

Numbering in AutoCAD 2007- is

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

gcp310 发表于 2022-7-5 23:21:59

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

gcp310 发表于 2022-7-5 23:25:07

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 (

Guest Alan Cull 发表于 2022-7-5 23:35:17

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))

Ako 发表于 2022-7-5 23:43:18

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

mvrcad 发表于 2022-7-5 23:46:52

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

alanjt 发表于 2022-7-5 23:51:54

http://www.cadtutor.net/forum/showthread.php?t=35234

Ryder76 发表于 2022-7-6 00:02:15

 
 
ooooh me likes tables

anaskattayil 发表于 2022-7-6 00:06:07

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.

blaconi2000 发表于 2022-7-6 00:12:50

You could try the incremental numbering lisp on Lee-Mac's site: http://lee-mac.com/numinc.html
页: [1]
查看完整版本: Numbering in AutoCAD 2007- is