Create Block From Entities
block_create_from_entitiesCreates a reusable block definition from selected drawing entities while keeping originals intact. Handles that cannot be resolved are reported instead of silently dropped.
Instructions
Create a new block definition from existing entities in the drawing.
Works on both engines. The originals stay in model space — this defines a
reusable block from them rather than consuming them the way AutoCAD's BLOCK
command does; use block_insert to place copies, and delete the originals
yourself if you want the command's behaviour.
Handles that do not resolve are listed in skipped rather than silently
dropped, and a call where none resolve fails instead of leaving an empty
definition behind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | New block definition name | |
| base_x | No | Block base point X | |
| base_y | No | Block base point Y | |
| handles | Yes | List of entity handles to include in the block |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||