IBSM LISP: Insert Block at Segment Midpoint (Free AutoLISP Download)
IBSM inserts a copy of a chosen block at the true midpoint of every individual segment of a selected polyline, no matter how unequal the segment lengths are. AutoCAD's native MEASURE places blocks at a fixed distance, and DIVIDE splits the whole polyline into equal parts, neither can target the midpoint of each separate segment. IBSM solves that gap directly.
MIDBLK-bgol (Insert Block at Segment Midpoint)
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 per-segment midpoint block insertion used in landscape and planting layout 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
IBSM inserts a copy of a chosen block at the true midpoint of every individual segment of a selected polyline, no matter how unequal the segment lengths are. AutoCAD's native MEASURE places blocks at a fixed distance, and DIVIDE splits the whole polyline into equal parts, neither can target the midpoint of each separate segment. IBSM solves that gap directly.
How to Use
- Load
MIDBLK-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
IBSMat the command line and press Enter. - Select the polyline whose segments should each receive a block.
- Type the name of an existing block in the drawing when prompted.
- A copy of that block is inserted at the midpoint of every segment of the selected polyline, placed on a dedicated layer,
BGOL-IBSM(colour green).
Why Use It
- Fills a native gap, neither
MEASUREnorDIVIDEcan target the midpoint of each individual segment when segment lengths vary;IBSMdoes this directly. - Time savings, automates precise per-segment midpoint placement instead of manually snapping to each segment's midpoint one at a time.
- Consistency, every segment gets exactly one block, evenly centered, regardless of how many segments or how irregular their lengths.
Where to Use It
- Landscape and planting layout drawings, placing trees, shrubs, or other repeated symbols evenly along a path or boundary line.
- Placing utility markers, posts, or fixtures at the midpoint of each fence, pipe, or cable segment.
- Any drafting task needing a symbol centered on each segment of a multi-segment polyline, rather than at fixed distance intervals.
Notes
- Works on LWPOLYLINE entities. Segments containing an arc (bulge) are treated by their chord midpoint for simplicity.
- Block scale and rotation default to 1/1/0; edit
*bgol-ibsm-scale*and*bgol-ibsm-rot*near the top of the .lsp file to change the defaults. - Closed polylines also receive a block on the closing segment between the last and first vertex.
- 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
IBSM is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Works on LWPOLYLINE entities. Segments containing an arc (bulge) are treated by their chord midpoint for simplicity.
Fills a native gap, neither MEASURE nor DIVIDE can target the midpoint of each individual segment when segment lengths vary; IBSM does this directly.
Yes. IBSM 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 MIDBLK-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type IBSM 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.