add_drawing_dimension
Add driven reference dimensions to a drawing view between edges or points, measuring distance or angle, or line length, circle diameter, and arc radius without altering the model.
Instructions
Add a dimension to a drawing view between two of its edges or points, chosen by the ids that list_drawing_views(view=...) reports (E3 = an edge, P2 = a point). Two parallel lines, two points, a point and a line, or a circle and a line or circle (measured from the centre) give a distance; two crossing lines give an angle. With only first: the length of a line, the diameter of a circle or the radius of an arc. direction forces a horizontal or vertical measurement. The dimension is a reference (driven) one: it shows the model's size and cannot change it. The same dimension again on the same entities is refused; one equal in size to a dimension already in the view is added with a warning naming it. Returns its name, value and place. Several dimensions in one view: give the others in more (one call); if any is refused, none of the call's dimensions stays.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"view": "<view>",
"first": "<first>"
},
"name": "add_drawing_dimension"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| more | No | Further dimensions in the same view in this call, e.g. [{"first": "E2", "second": "E5"}]; placed beside the first | |
| unit | No | Unit of the length inputs: mm (the default, whatever set_units says), cm, m, inch or ft. Results are in mm | |
| view | Yes | Name of the view | |
| first | Yes | Edge or point id, e.g. E1 or P1 | |
| second | No | Second edge or point id (optional) | |
| x_sheet | No | Where the dimension text goes, from the left edge (in unit, mm by default) of the sheet | |
| y_sheet | No | Where the dimension text goes, from the bottom edge (in unit, mm by default) of the sheet | |
| direction | No | Force the measuring direction (default: SolidWorks decides) |