MNMX LISP: Find Minimum & Maximum Number in a Boundary (Free AutoLISP Download)
MNMX scans all numeric TEXT entities located inside a selected polyline boundary, identifies the minimum and maximum numeric values among them, and marks those two specific text entities with a fitted circle, filling a gap AutoCAD's native FIND command leaves, since FIND can only locate a value you already know, not tell you which of many text values is smallest or largest.
MNMXT-bgol (Find Minimum & Maximum Number in a Boundary)
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 boundary-scoped min/max text-value finder utilities used in survey/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
MNMX scans all numeric TEXT entities located inside a selected polyline boundary, identifies the minimum and maximum numeric values among them, and marks those two specific text entities with a fitted circle, filling a gap AutoCAD's native FIND command leaves, since FIND can only locate a value you already know, not tell you which of many text values is smallest or largest.
How to Use
- Load
MNMXT-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
MNMXat the command line and press Enter. - Select a closed polyline boundary (e.g. a parcel or grid outline).
- Every numeric TEXT entity whose insertion point falls inside that boundary is scanned. The minimum-value text is circled in blue and the maximum-value text is circled in red, both on layer
BGOL-MNMX. The count of text found, and the minimum/maximum values, are reported at the command line.
Why Use It
- Fills a Native Gap, AutoCAD's
FINDcommand can only locate a known value, not determine which of many is smallest or largest; this routine provides that missing capability. - Spatially Scoped, uses a polyline boundary to scope the search, useful for finding the min/max within a specific area (e.g. one parcel or one grid section) rather than the whole drawing.
- Time Savings, instantly identifies extreme values instead of manually scanning and comparing every text value by eye.
Where to Use It
- Identifying the highest and lowest elevation points within a specific survey boundary or grid area.
- Any QA or design-review task needing the extreme (min/max) values within a defined region of a drawing quickly identified and marked.
- Earthwork or terrain analysis where knowing the highest/lowest spot levels within a boundary is a key first step.
Notes
- The boundary must be a
LWPOLYLINEorPOLYLINE; other entity types are rejected with a message. - Point-in-boundary testing uses a standard crossing-number (point-in-polygon) algorithm against the boundary's vertex list.
- Non-numeric text inside the boundary is still scanned (parsed as
0), keep the boundary limited to genuinely numeric labels for reliable results. - 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
MNMX is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
The boundary must be a LWPOLYLINE or POLYLINE; other entity types are rejected with a message.
Fills a Native Gap, AutoCAD's FIND command can only locate a known value, not determine which of many is smallest or largest; this routine provides that missing capability.
Yes. MNMX 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 MNMXT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type MNMX 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.