SPTX LISP: Split Text Into Words (Free AutoLISP Download)
SPTX splits a selected multi-word TEXT entity, e.g. "MAIN ROAD", into a separate TEXT entity for each word, laid out at standardized spacing along the original text's baseline direction. The original combined text is removed, and each word becomes independently movable, editable, and reusable by other word-level tools.
SPLITWRD-bgol (Split Text Into Words)
Command Type: AutoLISP routine (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in
Inspired by the general concept of text-splitting utilities used in CAD drafting. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.
Overview
SPTX splits a selected multi-word TEXT entity, e.g. "MAIN ROAD", into a separate TEXT entity for each word, laid out at standardized spacing along the original text's baseline direction. The original combined text is removed, and each word becomes independently movable, editable, and reusable by other word-level tools.
How to Use
- Load
SPLITWRD-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
SPTXat the command line and press Enter. - Select the multi-word text entity you want to split.
- Enter the spacing between resulting words when prompted (defaults to 1.5ร the text height).
- One new TEXT entity is created per word, on a dedicated layer,
BGOL-SPTX(colour magenta), positioned along the original text's baseline direction and rotation. The original combined text entity is deleted.
Why Use It
- Simplicity, removes the need to manually delete and retype each word as a separate text entity.
- Efficiency, automates the entire splitting and placement process in one command.
- Standardization, keeps consistent spacing between the resulting word-level entities, preserving a uniform look.
Where to Use It
- Breaking multi-word labels (road names, plot descriptions) into individually-movable word entities for flexible repositioning.
- Preparing text for further processing by other word-level or per-entity LISP tools that expect single-word text rather than multi-word strings.
- Any drafting task requiring granular, word-by-word control over previously combined text content.
Notes
- Words are split on spaces; multiple consecutive spaces collapse to a single gap between words.
- Each new word entity inherits the original text's height and rotation, so the split result reads naturally in place of the original.
- Only plain TEXT entities are supported; MTEXT is reported and skipped.
- Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.
Credits
Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.
Frequently Asked Questions
SPTX is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Words are split on spaces; multiple consecutive spaces collapse to a single gap between words.
Simplicity, removes the need to manually delete and retype each word as a separate text entity.
Yes. SPTX is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop SPLITWRD-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type SPTX at the command line to run it.
๐ค About BGol Community
BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.
๐ Made with โค๏ธ by BGol Community of Advanced Surveying
Free, open-source, and built for the CAD community, for personal or commercial use, always.