vw2d_draw
Draw exact 2D objects in Vectorworks, including polygons, arcs, dimensions, and text, with class/layer attributes and per-object deviation checks.
Instructions
Draw exact 2D objects (all or nothing, one undo step).
Each item has a "type" plus geometry; optional "class", "layer", "name", "attributes", "unit" override the call-level defaults:
polygon / polyline: {"points": [[x, y], ...], "relative": false, "holes": [[[x, y], ...]]}. relative=true: points after the first are offsets (exact decimal sums, like a Maßkette).
path (lines + true arcs): {"start": [x, y], "segments": [ {"line_to": [x, y]}, {"arc_to": [x, y], "center": [cx, cy], "direction": "ccw"|"cw"} | {"arc_to": [x, y], "through": [x, y]} | {"arc_to": [x, y], "radius": r, "direction": "ccw", "large": false}], "closed": true, "holes": [path or points]}
rect: {"corner": [x, y], "width": w, "height": h, "angle": 0} or {"p1": [x, y], "p2": [x, y]}
circle {"center", "radius"}; arc {"center", "radius", "start_angle", "sweep"} or {"start", "through", "end"}; oval {"center", "width", "height", "angle"}; line {"p1", "p2"}; locus {"point"}
text {"text", "position", "size" (pt), "font", "align" left|center|right, "valign" top|center|baseline|bottom, "angle"}
dimension {"p1", "p2", "offset", "orientation" horizontal|vertical|aligned}; chain_dimension {"points": [...], ...} attributes: pen, fill ("none" or "#rrggbb"), hatch (name), line_style, line_weight (mm), opacity; without any, everything is 'by class'. Every object needs a class (class_name or per item) unless allow_no_class=True. Returns each object's uuid and its exactness (deviation between request and what Vectorworks stored), plus any check issues involving the new objects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | document | |
| check | No | ||
| items | Yes | ||
| layer | No | ||
| attributes | No | ||
| class_name | No | ||
| tolerance_mm | No | ||
| allow_no_class | No |