Over 1.117.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
The new Beam calculator, Spirograph generator and Regression curves in the Converters section.
New AutoCAD 2027 commands and sys.variables
CAD tip # 4136:
Question
A
Use the LISP application by CAD Studio (ARKANCE) - srxText (see
Download) to add digit-triplets separators to existing drawing texts/figures. Use the Regular expression option of the text replacement command.
Download) to add digit-triplets separators to existing drawing texts/figures. Use the Regular expression option of the text replacement command.
The search/replace expression for thousands separator (",") can be e.g.:
-?\([0-9]+\)\([0-9][0-9][0-9]\) \1,\2You may need to repeat this for millions etc. (srxText can be scripted). It will change:
1234 -> 1,234 -1234.5 -> -1,234.5
Update: the newer version of the command - SRXTEXT2 - has easier, VBscript-like formatting of the control codes.
For this thousands separator task, you can use the following, more flexible search/replace code:
(\d)(?=(\d{3})+\b)
$1,


Load the VLX file with APPLOAD and type SRXTEXT. See Readme for other examples of complex text replacements.
ACADADTMapACADMMDT
23.11.2004
15941×
FAQ
this tip shared by ARKANCE experts applies to: AutoCAD · AutoCAD Architecture · AutoCAD Map 3D · AutoCAD Mechanical · MDT ·
![CAD Forum - ARKANCE Community - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]](../common/arkance_186.png)

