CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 8054

CAD tip CAD tip # 13408:

Question CAD 
 %  platform  category 
Q - question

How to increment the numbers in DWG texts by a specified value, e.g. +1, +10?

A - answer You can use the NumInText utility for operations with numbers in drawing texts - single-line texts, paragraph texts and attributes. To increase (increment) numbers in a DWG drawing, use its Add option.

It is indifferent whether the number forms a standalone text or is used in combination with other descriptive text - e.g. Room No.123. The selected texts will be processed so that the numbers contained in them are increased by the specified value, e.g. 100. The label text "Room No.123" becomes "Room No.223", the text "Rooms No.124" becomes "Room No.224", etc.

NumInText searches only for decimal numbers by default. If you want to work with integers, you need to enable this option in the Setup option, or pre-set the LISP variable:

(setq _numintextDoInts T)

The usage of NumInText is described in more detail in the Tip 11289.

100% *  CAD 
12.7.2022    12183×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 11492:Adding selected numbers in drawing texts - counting numbers (GrSelNum).
Tip 11289:Adding, multiplying and rounding numbers inside DWG drawing texts - NumInText.
Tip 8181:Rounding decimal numbers in drawing texts.

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

DwgTextTranslator translates a series of drawings from one language to another using MS Access.
Download a fully functional trial version.

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.