SLHT LISP: Select Text by Height Range (Free AutoLISP Download)
SLHT scans every TEXT entity in the drawing and builds a selection containing only those whose height falls within a minimum/maximum range you specify. The matching text is left selected (grips shown) when the command finishes, ready for a follow-up batch operation, move, recolor, change layer, delete, and so on, without manually picking each one.
HTSELECT-bgol (Select Text by Height Range)
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 height-range text selection 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
SLHT scans every TEXT entity in the drawing and builds a selection containing only those whose height falls within a minimum/maximum range you specify. The matching text is left selected (grips shown) when the command finishes, ready for a follow-up batch operation, move, recolor, change layer, delete, and so on, without manually picking each one.
How to Use
- Load
HTSELECT-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
SLHTat the command line and press Enter. - Enter the minimum text height when prompted.
- Enter the maximum text height when prompted.
- Every TEXT entity in the drawing whose height falls within that range is selected and grip-highlighted. Run any further command (e.g.
MOVE,CHPROP,ERASE) and it will act on that selection.
Why Use It
- Time savings, automates finding and selecting text by height, avoiding tedious manual pick-by-pick selection across a drawing.
- Accuracy, filters precisely by the height criteria you set, avoiding accidental inclusion of unrelated text sizes.
- Chainable, leaves the result as an active selection so you can immediately follow up with any other editing command.
Where to Use It
- Isolating all text of a particular size category (e.g. small annotation text, or large title-style text) for batch formatting or layer reassignment.
- Quality-checking a drawing for inconsistent text heights by selecting and reviewing text outside an expected size range.
- Any batch-editing task where text height, rather than content or position, is the relevant selection criterion.
Notes
- Scans the entire drawing (
ssget "_X"), not just the current viewport, so it finds height-matching text anywhere in the file. - The range check is inclusive on both ends (
minh <= height <= maxh). - If no text falls in the given range, the command reports that plainly and leaves the previous selection 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
SLHT is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Scans the entire drawing (ssget "_X"), not just the current viewport, so it finds height-matching text anywhere in the file.
Time savings, automates finding and selecting text by height, avoiding tedious manual pick-by-pick selection across a drawing.
Yes. SLHT 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 HTSELECT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type SLHT 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.