draw_entities
Create 2D/3D CAD geometry, text, dimensions, leaders, and tables from shorthand or JSON, with automatic layer creation and centroid/extents calculation.
Instructions
Create new 2D/3D geometric primitives, text, dimensions, leaders, and native tables.
Behavior:
Mutation: Mutates the drawing database by creating and appending new entities.
Persistence: Changes persist in the active drawing database and are written to DWG/DXF file upon save.
Side Effects: Auto-creates destination layers if they do not exist. Automatically computes centroid and extents.
Usage Guidelines:
When to Use: Call whenever creating new geometry from scratch (lines, walls, circles, rectangles, polylines, text labels, architectural dimensions, multi-arrow leaders, or schedule tables).
Sibling Routing / Alternatives:
For modifying, transforming (move, rotate, scale), restyling, or deleting existing entities, use
manage_entities.For inserting reusable component blocks (doors, windows, symbols) or creating block definitions, use
manage_blocks.For creating paperspace presentation sheets, title blocks, and viewports, use
manage_layouts.For attaching external DWG references or raster underlays, use
manage_xrefs.
Shorthand Grammar (one entity specification per line):
line|start|end|color|layer → line|0,0|10,10|red|walls
circle|center|radius|color → circle|5,5|3|blue
rect|corner1|corner2|color → rect|0,0|20,15
text|pos|text|height|color → text|5,5|Hello|2.5
arc|center|radius|start|end → arc|0,0|5|0|90
polyline|points(;)|closed|color → polyline|0,0;10,10;20,0|closed
spline|points(;)|closed|color → spline|0,0;5,10;10,0
dimension|start|end|color → dimension|0,0|10,0
leader|points|text|height|color|layer → leader|0,0;10,10|Note|2.5|red
leader|group1
group2...|text|height|color → leader|0,0;10,10~~0,0;-10,10|Notetable|ins|rows|cols|row_h|col_w|title|headers|data → table|0,0|4|3|3|15|Precios|Item;Cant;Val|Acero;10;150~~Mano;5;120
Defaults: color=white, layer=0. Coordinates: "x,y" or "x,y,z". Points in a polyline/leader: semicolon-separated "0,0;10,10".
Parameters:
entities: Shorthand string (one command per line) or JSON array of entity specification objects.
Returns: JSON string with created entity handles, status, and summary count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entities | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |