Drawing Tools¶
Create and edit 2-D technical drawings: add projected/section/detail views, place dimensions, notes, and annotations, update title blocks and sheet formats, and run drafting standards checks.
Prerequisite: An active SolidWorks Drawing (.slddrw) document.
Total tools in this category: 14
create_drawing_view¶
Place one named view of a part or assembly on the active drawing sheet.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_path |
str |
✅ | `` | Path to the SolidWorks model file |
view_type |
str |
✅ | `` | Type of view (orthographic, isometric, section, detail) |
position_x |
float |
— | 100.0 |
X position in drawing (mm) |
position_y |
float |
— | 200.0 |
Y position in drawing (mm) |
scale |
float |
— | 1.0 |
View scale factor |
orientation |
str |
— | front |
View orientation (front, top, right, isometric) |
Sample call:
add_dimension¶
Add one dimension between drawing entities at a position on the sheet.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dimension_type |
str |
✅ | `` | Type of dimension (linear, radial, angular, diameter) |
entity1 |
str |
✅ | `` | First entity to dimension (edge, face, point) |
entity2 |
str? |
— | None |
Second entity for linear/angular dimensions |
position_x |
float |
✅ | `` | X position for dimension text |
position_y |
float |
✅ | `` | Y position for dimension text |
precision |
int |
— | 2 |
Number of decimal places |
Sample call:
add_note¶
Place a text note on the active drawing sheet at a position in millimetres.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text |
str |
✅ | `` | Note text content |
position_x |
float |
✅ | `` | X position for note |
position_y |
float |
✅ | `` | Y position for note |
font_size |
float |
— | 12.0 |
Font size in points |
leader_attachment |
str? |
— | None |
Entity to attach leader line to |
Sample call:
create_section_view¶
Cut a section view along a line across a drawing view.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
section_line_start |
List[float] |
✅ | `` | Start point of section line as [x, y] |
section_line_end |
List[float] |
✅ | `` | End point of section line as [x, y] |
view_position_x |
float |
✅ | `` | X position for section view |
view_position_y |
float |
✅ | `` | Y position for section view |
scale |
float |
— | 1.0 |
Section view scale |
label |
str |
— | A |
Section view label |
Sample call:
{
"section_line_start": [],
"section_line_end": [],
"view_position_x": 10.0,
"view_position_y": 10.0
}
create_detail_view¶
Magnify a circular area of a drawing view as a detail view.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
center_x |
float |
✅ | `` | X center of detail circle |
center_y |
float |
✅ | `` | Y center of detail circle |
radius |
float |
✅ | `` | Radius of detail circle |
view_position_x |
float |
✅ | `` | X position for detail view |
view_position_y |
float |
✅ | `` | Y position for detail view |
scale |
float |
— | 2.0 |
Detail view scale |
label |
str |
— | A |
Detail view label |
Sample call:
{
"center_x": 0.0,
"center_y": 0.0,
"radius": 15.0,
"view_position_x": 10.0,
"view_position_y": 10.0
}
update_sheet_format¶
Change the active drawing's sheet format file and title-block fields.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
format_file |
str |
✅ | `` | Path to sheet format template (.slddrt) |
sheet_size |
str |
— | A3 |
Sheet size (A4, A3, A2, A1, A0) |
title |
str |
— | `` | Drawing title |
drawn_by |
str |
— | `` | Drawn by field |
checked_by |
str |
— | `` | Checked by field |
approved_by |
str |
— | `` | Approved by field |
drawing_number |
str |
— | `` | Drawing number |
Sample call:
auto_dimension_view¶
Dimension a drawing view automatically with SolidWorks' auto-dimension scheme.
Prerequisite: SolidWorks running
Sample call:
check_drawing_standards¶
Check the active drawing against a drafting standard and score it.
Prerequisite: SolidWorks running
Sample call:
create_technical_drawing¶
Place a model's three standard views (front, top and side) on the active drawing sheet in one call.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
template |
str? |
— | None |
Drawing template file path |
model_file |
str? |
— | None |
Model file to create drawing from |
sheet_size |
str |
— | A3 |
Sheet size |
title |
str |
— | `` | Drawing title |
output_path |
str? |
— | None |
Output drawing path |
sheet_format |
str? |
— | None |
Sheet format |
scale |
str |
— | 1:1 |
Drawing scale |
auto_populate_views |
bool |
— | False |
Automatically populate standard views |
Sample call:
add_drawing_view¶
Place one named view of a part or assembly on the active drawing sheet; the same as create_drawing_view.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
drawing_path |
str? |
— | None |
Path to drawing file |
view_name |
str? |
— | None |
Name of the drawing view |
operation |
str |
— | add |
Operation to perform (create, update, delete) |
model_file |
str? |
— | None |
Model file path |
view_type |
str? |
— | None |
Type of view |
parent_view |
str? |
— | None |
Parent view alias |
position |
List[float]? |
— | None |
View position |
scale |
str? |
— | None |
View scale |
parameters |
Dict[str, Any] |
— | {} |
View parameters |
Sample call:
add_annotation¶
Add an annotation (a note, balloon or surface-finish symbol) to the active drawing.
Prerequisite: SolidWorks running
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
drawing_path |
str? |
— | None |
Path to drawing file |
annotation_type |
str |
✅ | `` | Type of annotation (note, balloon, surface_finish, etc.) |
text |
str |
✅ | `` | Annotation text content |
position_x |
float? |
— | None |
X position for annotation |
position_y |
float? |
— | None |
Y position for annotation |
position |
List[float]? |
— | None |
Annotation position |
font_size |
float |
— | 12.0 |
Font size in points |
leader_attachment |
str? |
— | None |
Entity to attach leader line to |
drawn_by |
str |
— | `` | Drawn by field |
checked_by |
str |
— | `` | Checked by field |
approved_by |
str |
— | `` | Approved by field |
drawing_number |
str |
— | `` | Drawing number |
Sample call:
update_title_block¶
Fill in the active drawing's title-block fields (title, drawn by, drawing number and so on).
Prerequisite: SolidWorks running
Sample call:
auto_center_marks¶
Insert centre marks on the holes, slots and (optionally) fillets of one drawing view.
Prerequisite: Active drawing containing the named view
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
view_name |
str |
✅ | `` | Name of a view on the active drawing, e.g. 'Drawing View1' |
mark_holes |
bool |
— | true |
Mark holes / bores |
mark_fillets |
bool |
— | false |
Mark fillets |
mark_slots |
bool |
— | true |
Mark slots |
Sample call:
list_drawing_views¶
List the views on the active drawing, by name.
Prerequisite: Active drawing
Parameters: none
Sample call:
Sample response:
{
"status": "success",
"message": "3 view(s): Drawing View1, Drawing View2, Drawing View3",
"views": ["Drawing View1", "Drawing View2", "Drawing View3"],
"count": 3
}