AQucsaiJr 发表于 2022-7-6 14:15:56

将现有文本更改为数字

我的图纸中已有文字,这些文字已按其应有的方式排列。任何人都知道一种方法,只需点击文本,并让它自动覆盖每个测试与递增的数字。。。
 
例如,如果我有10行单独的文本,都是“示例文本”,我想把它们分别改为1到10。
 
我已经浏览了论坛上大多数自动编号的LISP文件,除非我错过了,否则我找不到这样的文件。

lpseifert 发表于 2022-7-6 14:22:40

您是否尝试过Express Tools的Tcount命令?

AQucsaiJr 发表于 2022-7-6 14:25:46

你知道的。。。我只是说ACAD没有工具来做这件事。。。我会试试的。谢谢

Lee Mac 发表于 2022-7-6 14:33:59

除此之外,我认为CAB在theSwamp有很好的功能。组织

AQucsaiJr 发表于 2022-7-6 14:38:50

我想你以前给过我那个链接。。。然而,我没有找到你给我的链接。

Lee Mac 发表于 2022-7-6 14:39:42

我不确定它是否适用于现有文本,因为我还没有完全尝试过,但试一试,看看你的想法:
 
http://www.theswamp.org/index.php?topic=518.0

AQucsaiJr 发表于 2022-7-6 14:46:13

嗯,我想现在是在沼泽注册的最好时机。。。我将能够尝试这个链接一旦注册。

Lee Mac 发表于 2022-7-6 14:52:30

是的,theSwamp的编程水平。org比这里高得多,但这里的CAD帮助更好。

JeepMaster 发表于 2022-7-6 14:53:42

那是因为我们有李在这里帮助人们。

JeepMaster 发表于 2022-7-6 14:59:08

这就是你要找的吗?
ASMI的另一款酷炫工具。
 
 
;;                                                                      ;;
;; ==================================================================== ;;
;;                                                                      ;;
;;RENUM.LSP - This program converts TEXT, MTEXT and ATTRIBUTES in   ;;
;;            numbers with a prefix and a suffix.                     ;;
;;                                                                      ;;
;; ==================================================================== ;;
;;                                                                      ;;
;;Command(s) to call: RENUM                                           ;;
;;                                                                      ;;
;;Specify a suffix, a prefix and starting number (for erase the old   ;;
;;suffix or prefix you should press Spacebar). Pick to TEXT, MTEXT    ;;
;;ATTRIBUTES or press Esc to quit. The program remembers old          ;;
;;properties and it is possible to confirm it pressing of Spacebar    ;;
;;key.                                                                ;;
;;                                                                      ;;
;; ==================================================================== ;;
;;                                                                      ;;
;;THIS PROGRAM AND PARTS OF IT MAY REPRODUCED BY ANY METHOD ON ANY    ;;
;;MEDIUM FOR ANY REASON. YOU CAN USE OR MODIFY THIS PROGRAM OR      ;;
;;PARTS OF IT ABSOLUTELY FREE.                                        ;;
;;                                                                      ;;
;;THIS PROGRAM PROVIDES 'AS IS' WITH ALL FAULTS AND SPECIFICALLY      ;;
;;DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS      ;;
;;FOR A PARTICULAR USE.                                             ;;
;;                                                                      ;;
;; ==================================================================== ;;
;;                                                                      ;;
;;V1.0, 16 June, 2005, Riga, Latvia                                 ;;
;;© Aleksandr Smirnov (ASMI)                                          ;;
;;For AutoCAD 2000 - 2008 (isn't tested in a next versions)         ;;
;;                                                                      ;;
;;                           http://www.asmitools.com               ;;
;;                                                                      ;;
;; ==================================================================== ;;



(defun c:renum (/ oldPref oldSuf oldStart curText curStr)
(vl-load-com)
(if(not rnm:Pref)(setq rnm:Pref ""))
(if(not rnm:Suf)(setq rnm:Suf ""))
(if(not rnm:Start)(setq rnm:Start 1))
(setq oldPref rnm:Pref
       oldSuf rnm:Suf
       oldStart rnm:Start); end setq
(setq rnm:Pref
   (getstring T
   (strcat "\nPrefix: <"rnm:Pref">: ")))
(if(= "" rnm:Pref)(setq rnm:Pref oldPref))
(if(= " " rnm:Pref)(setq rnm:Pref ""))
(setq rnm:Suf
   (getstring T
   (strcat "\nSuffix: <"rnm:Suf">: ")))
(if(= "" rnm:Suf)(setq rnm:Suf oldSuf))
(if(= " " rnm:Suf)(setq rnm:Suf ""))
(setq rnm:Start
   (getint
   (strcat "\nStarting number <"
      (itoa rnm:Start)">: ")))
(if(null rnm:Start)(setq rnm:Start oldStart))
    (while T
      (setq curStr(strcat rnm:Pref(itoa rnm:Start)rnm:Suf))
      (setq curText
          (car
            (nentsel "\n<<< Pick TEXT, MTEXT or ATTRIBUTE or press Esc to quit >>> ")))
      (if
      (and
          curText
          (member(cdr(assoc 0(entget curText))) '("TEXT" "MTEXT" "ATTRIB"))
          ); end and
      (progn
      (vla-put-TextString
          (vlax-ename->vla-object curText)curStr)
         (setq rnm:Start(1+ rnm:Start))
      ); end progn
       (princ "\n This is not DText or MText ")
       ); end if
      ); end while
(princ)
); end of c:renum

(princ "\n http:\\\\www.AsmiTools.com ")
(princ "\n Renumber tool. Type RENUM to run. ")
页: [1] 2
查看完整版本: 将现有文本更改为数字