SLTC LISP: Select Text Containing Pattern (Free AutoLISP Download)
SLTC selects every TEXT entity in the drawing whose content matches a pattern you specify, starts with, ends with, or contains a given substring. Native CAD find/search tools typically lack this kind of pattern-based filtering; SLTC fills that gap and leaves the matching text selected for further batch editing.
TXTFIND-bgol (Select Text Containing Pattern)
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 pattern-based text search 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
SLTC selects every TEXT entity in the drawing whose content matches a pattern you specify, starts with, ends with, or contains a given substring. Native CAD find/search tools typically lack this kind of pattern-based filtering; SLTC fills that gap and leaves the matching text selected for further batch editing.
How to Use
- Load
TXTFIND-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
SLTCat the command line and press Enter. - Enter the search text/substring when prompted.
- Choose the match mode:
Starts,Ends, orContains(defaults toContainsif you just press Enter). - Every TEXT entity in the drawing matching your pattern is selected and grip-highlighted. Run any further command (
MOVE,CHPROP,ERASE, etc.) and it acts on that selection.
Why Use It
- Fills a native gap, provides prefix/suffix/substring matching not available in standard CAD find/search tools.
- Time savings, instantly selects all matching text across a drawing instead of manually scanning and picking each one.
- Flexible, supports three different matching behaviors for varied search needs.
Where to Use It
- Selecting all street/road name labels ending in "Road" (or similar suffix) for batch editing or formatting.
- Selecting all text entities starting with a specific letter or prefix (e.g. all point labels starting with "N" for north-side points).
- Any drawing QA or batch-editing task requiring text entities filtered and selected by a naming pattern rather than manual picking.
Notes
- Matching uses AutoLISP's native
wcmatchwildcard function and is case-sensitive. - Scans the entire drawing (
ssget "_X"), not just the current viewport. - If nothing matches, the command reports that plainly and the previous selection is left untouched.
- 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
SLTC is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Matching uses AutoLISP's native wcmatch wildcard function and is case-sensitive.
Fills a native gap, provides prefix/suffix/substring matching not available in standard CAD find/search tools.
Yes. SLTC 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 TXTFIND-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type SLTC 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.