Function Syntax: CPAGES_BBB / CreateMultipleRectangleBlocks Version: 1.0 Date: 20.06.2026 6:38:48PM N/A short_description: | SEO Description ๐Ÿš€ CreateMultipleRectangleBlocks is an AutoCAD and Civil 3D AutoLISP DCL tool for repeated page rectangle layout and page block creation. It helps CAD users automate page zones, generate rectangle guides, collect drawing entities, and create organized block references inside the active DWG. command: | Main Command and Loading Method ๐Ÿงฐ Load the LISP with APPLOAD or LOAD. Run CreateMultipleRectangleBlocks to open the DCL dialog named Make Page Blocks - Settings. Target platform: AutoCAD and Civil 3D using AutoLISP, Visual LISP ActiveX, DCL, entmake, and vla-ZoomWindow. description: | Detailed Description ๐Ÿ“˜ The program creates repeated rectangular page zones and can convert the entities inside each zone into a separate AutoCAD block. ๐Ÿ“ The user enters a suffix, page start, page end, rectangle width, rectangle height, Y step, X step, selection offset, and insertion point. ๐ŸŽจ Optional inner rectangles are drawn on RECT_INNER and optional outer selection rectangles are drawn on RECT_OUTER. ๐Ÿ” The Preview button zooms to the last drawn rectangle batch, and the Undo button removes the last batch with AutoCAD undo logic. ๐Ÿงฉ After OK, the routine collects drawing entities per page zone and creates block definitions named Page_NNN_suffix. This is useful for AutoCAD and Civil 3D sheet extraction, page packaging, plan cleanup, block automation, and DWG production workflows. helper_function: | Helper Logic ๐Ÿง  Dialog value parsing - MPB:parse-real, MPB:parse-int, MPB:read-tiles, and MPB:restore-tiles read and restore DCL settings. ๐Ÿท๏ธ Block naming - MPB:zpad creates three-digit page numbers for Page_001, Page_002, and higher block names. ๐ŸŽจ Layer creation - MPB:ensure-layer creates RECT_INNER and RECT_OUTER if they do not already exist. ๐Ÿ“ Rectangle entity creation - MPB:entmake-rect builds closed LWPOLYLINE rectangles with entmake. ๐Ÿ” Zoom preview - MPB:do-zoom and MPB:do-preview use vla-ZoomWindow to inspect the rectangle batch. โ†ฉ๏ธ Undo batch handling - MPB:exec-draw creates an UNDO MARK and MPB:exec-undo runs UNDO BACK. ๐Ÿ“Š Entity collection - MPB:collect-all scans drawing entities and assigns them to page zones using their first Y coordinate. ๐Ÿงน Optional cleanup - MPB:make-block can run -OVERKILL before creating the block definition. ๐Ÿงฉ Block generation - MPB:make-block creates the block, inserts it, and erases the original wrapped entities. functionalities: | Functionalities ๐Ÿš€ Create page blocks - turns repeated page zones into organized AutoCAD block references. ๐Ÿ“ Draw rectangle guides - creates inner and outer page rectangles on dedicated layers. ๐Ÿ”ข Batch page range processing - processes many pages in one command run. ๐Ÿท๏ธ Automatic naming - uses Page_NNN_suffix for predictable block naming. ๐Ÿ“Œ Pick insertion point - lets the user define the top-left point of page 1 in the drawing. ๐Ÿ” Preview and zoom - zooms to the rectangle batch before final block creation. โ†ฉ๏ธ Undo rectangle batch - removes the last drawn rectangle batch quickly. ๐Ÿงน Optional OVERKILL - cleans duplicate geometry before block wrapping. ๐Ÿ“Š Progress reporting - prints entity counts, empty pages, skipped blocks, and created blocks. result: | Final Result โœ… The final result is a faster AutoCAD and Civil 3D workflow for drawing repeated page rectangles, collecting page-zone geometry, and converting that geometry into reusable block definitions. The tool reduces manual selection work, improves drawing organization, supports sheet-based cleanup, and creates consistent page block references. additional_info: | Important Notes and Limitations ๐Ÿ”ด The command is destructive for collected geometry because source entities are erased after they are copied into a created block. ๐ŸŸง Existing block names are skipped and are not overwritten. ๐Ÿ“Œ Entity assignment is based on the first Y coordinate, not full boundary intersection testing. ๐Ÿ› ๏ธ The uploaded code contains (*i*mpb-xstep*) in the draw loop. If undefined, it should likely be (* i *mpb-xstep*).