PSFX LISP: Append Prefix / Suffix to Text (Free AutoLISP Download)
PSFX adds a user-specified prefix and/or suffix to every selected TEXT entity in a single pass, for example, turning a plain elevation value like 13.42 into GL: 13.42 M across dozens of labels at once.
PSAP-bgol (Append Prefix / Suffix to Text)
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 batch prefix/suffix text-labeling 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
PSFX adds a user-specified prefix and/or suffix to every selected TEXT entity in a single pass, for example, turning a plain elevation value like 13.42 into GL: 13.42 M across dozens of labels at once.
How to Use
- Load
PSAP-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
PSFXat the command line and press Enter. - Enter the prefix text when prompted (or press Enter for none).
- Enter the suffix text when prompted (or press Enter for none).
- Select the TEXT entities to update, then press Enter to confirm.
- Every selected text is rewritten as
prefix + original value + suffix. A small reference tick mark is placed above each updated text on layerBGOL-PSFX(colour green) for a quick visual audit of which entities were touched.
Why Use It
- Efficiency, eliminates manual, one-by-one text editing for adding consistent labels or units.
- Accuracy, the prefix and suffix are applied identically across every selected text, avoiding typos from repeated manual entry.
- Customization, prefix and suffix content is fully user-defined, supporting any labeling scheme, unit annotation, or identifier tag.
Where to Use It
- Labeling elevation values with descriptive prefixes (e.g.
GL:for Ground Level,FL:for Finished Level) and/or unit suffixes (e.g.Mfor meters) in bulk. - Adding identifiers, tags, or consistent formatting to any set of numeric or text labels across a drawing.
- Any batch text-editing task requiring a consistent prefix/suffix applied across many text entities at once.
Notes
- Leaving both prefix and suffix blank cancels the command, nothing is changed.
- Works on TEXT entities; run
MT2TX-bgol.lspfirst to convert MText if needed. - 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
PSFX is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Leaving both prefix and suffix blank cancels the command, nothing is changed.
Efficiency, eliminates manual, one-by-one text editing for adding consistent labels or units.
Yes. PSFX 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 PSAP-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type PSFX 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.