drawing_add
Add multiple entities to a drawing as a batch and return their new IDs. Supports lines, polylines, walls, openings, grids, and text with per-drawing defaults applied.
Instructions
Add entities to a drawing (batch). Returns the new ids. defaults applies lg/ly/lc/lt to every entity that does not set them. entities: list of objects. Common keys: lg, ly (0-15 or hex "0".."F"), lc (1-9), lt (1-9), tag. {"type":"line","x1","y1","x2","y2"} {"type":"polyline","points":[[x,y],...],"closed":false} {"type":"rect","x","y","w","h","angle":0} (x,y = lower-left) {"type":"circle","cx","cy","r"} {"type":"arc","cx","cy","r","start","end"} (deg, CCW) {"type":"text","x","y","text","height":3,"width":3,"spacing":0,"angle":0,"align":"left|center|right","font"?,"cn"?} height/width/spacing are paper mm (図寸). x,y = baseline anchor (left-bottom unless align). {"type":"point","x","y"} {"type":"dimension","x1","y1","x2","y2","offset":500,"text"?,"text_height":3,"decimals":0} offset = real-mm distance from the measured points to the dimension line (sign = side). {"type":"solid","points":[[x,y]x3or4],"rgb":[r,g,b]?} Architectural (expand to Jw_cad lines/arcs/text): {"type":"wall","points":[[x,y],...],"thickness":150,"closed":false,"core":true,"core_ly":1,"core_extend":300, "openings":[{"at":1000,"width":800,"kind":"door|double_door|sliding|window|fixed|opening","hinge":"start|end","side":"+|-","frame":25}], "opening_lg":3,"opening_ly":0,"opening_lc":1} at = mm along the centre line; side "+" = left of travel {"type":"grid","xs":[0,3640],"ys":[0,2730],"x_labels":["X1","X2"],"y_labels":["Y1","Y2"],"extend":1500,"dims":false} {"type":"column","cx","cy","w":600,"h":600,"angle":0,"hatch":true} {"type":"room","x","y","name":"和室","height":5,"note":"6帖"} {"type":"pipe","points":[[x,y],...],"system":"給水|給湯|排水|通気|ガス|冷媒|ドレン|ダクト|給気|排気","diameter":"25A"} {"type":"equipment","kind":"toilet|sink|washbasin|bath|kitchen|ac_indoor|ac_outdoor|fan|cubicle|tank|elevator|box","x","y","w","h","angle","label"} A drawing created with a preset fills lg/ly/lc per type automatically (see presets_list).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| defaults | No | ||
| entities | Yes |