乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 15|回复: 9

[编程交流] Numbering in AutoCAD 2007- is

[复制链接]

1

主题

1

帖子

0

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 23:11:24 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

10

主题

23

帖子

13

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 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
回复

使用道具 举报

10

主题

23

帖子

13

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 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.
 
 
 

[code];;        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 (
回复

使用道具 举报

1

主题

64

帖子

69

银币

初来乍到

Rank: 1

铜币
2
发表于 2022-7-5 23:35:17 | 显示全部楼层
Here's another one you could try....
 
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 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

0

主题

5

帖子

5

银币

初来乍到

Rank: 1

铜币
0
发表于 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
回复

使用道具 举报

6

主题

23

帖子

17

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-5 23:46:52 | 显示全部楼层
Thanks Guys And Girls Have Saved Some Time At Work Using These Lisps, Cheers
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-5 23:51:54 | 显示全部楼层
http://www.cadtutor.net/forum/showthread.php?t=35234
回复

使用道具 举报

6

主题

99

帖子

93

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-6 00:02:15 | 显示全部楼层
 
 
ooooh me likes tables
回复

使用道具 举报

2

主题

10

帖子

8

银币

初来乍到

Rank: 1

铜币
10
发表于 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.
回复

使用道具 举报

0

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-6 00:12:50 | 显示全部楼层
You could try the incremental numbering lisp on Lee-Mac's site: http://lee-mac.com/numinc.html
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-11 03:20 , Processed in 0.857998 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表