get_status | Is SolidWorks reachable? revision, server version, active/current part |
new_part | Create a new empty part (becomes current) |
add_box(width_mm, height_mm, depth_mm, name) | Sketch rectangle + extrude; returns mass properties |
add_cylinder(diameter_mm, height_mm, name) | Cylinder by revolving a profile 360° about an axis (Y axis) |
add_disc(diameter_mm, thickness_mm, name, x_mm, y_mm) | Disc/puck/flange: circle extruded along +Z, centred at (x, y) (holes/patterns compose) |
add_cone(bottom_diameter_mm, top_diameter_mm, height_mm, name) | Cone/frustum by revolve (top Ø = 0 → full cone) |
add_revolved_profile(profile_mm, angle_deg, name, corner_radii_mm, axis_mm) | Revolve any closed (radius, height) profile about the Y axis (shafts, vases, rings), or [x, y] points about any line axis_mm on the Front plane; corner_radii_mm rounds its edges |
add_swept_pipe(path_mm, diameter_mm, bend_radius_mm, name, smooth) | Sweep a round profile along a 2D path with rounded bends (pipes, tubes, rods), or along a spline through the points with smooth=True |
add_swept_profile(profile_mm, path_mm, bend_radius_mm, name, corner_radii_mm) | Sweep any closed cross-section along a 2D path (rails, gaskets, trim, channels); corner_radii_mm rounds the cross-section |
add_lofted_solid(profiles_mm, heights_mm, name) | Loft/blend 2+ polygon or round profiles on stacked parallel planes (transitions, adapters, a leg thick at the knee) |
add_rib(start_mm, end_mm, toward_mm, thickness_mm, z_mm, name) | Straight rib / gusset in a plane parallel to Front at z_mm, grown toward toward_mm until it meets the part (L-bracket gussets) |
add_extruded_profile(points_mm, depth_mm, name, corner_radii_mm, rotate_deg, about_mm, draft_deg, merge) | Extrude any closed polygon [[x,y],…] (brackets, sections); corner_radii_mm rounds its corners with real sketch fillets, each radius a dimension; rotate_deg turns it about a pivot; draft_deg tapers its walls; merge=False keeps a separate body |
add_plane(base, offset_mm, angle_deg, about, name) | A reference plane offset from a plane, or turned about a model axis; its offset or angle a dimension; gives its origin and axes |
add_extruded_profile_on_plane(points_mm, plane, depth_mm, reverse, name, corner_radii_mm, draft_deg, merge) | Extrude a polygon drawn on any plane (3D points on it), merged with the part |
list_bodies() | The part's solid bodies: name, volume, bounding box |
combine_bodies(operation, main, tools, name) | Add, subtract or intersect bodies of the part (add / subtract / common) |
split_body(plane, name) | Split the part into two bodies along a plane |
add_extruded_spline(points_mm, depth_mm, name) | Extrude a smooth closed spline through points (free-form/organic outlines) |
add_hole(diameter_mm, x_mm, y_mm, name) | Cut a circular through-hole at (x, y) through the depth axis |
add_counterbore_hole(clearance_diameter_mm, cbore_diameter_mm, cbore_depth_mm, x_mm, y_mm, name) | Counterbored screw hole (flush cap-head / heat-set insert) on +Z |
add_thread(size, x_mm, y_mm, z_mm, length_mm, internal, name) | Real, printable ISO metric thread (e.g. M10x1.5) from a rod's end edge or a hole's mouth, via SolidWorks' Thread feature; the size is checked against the thread profiles. Internal: drill the basic minor diameter first (M10x1.5 → Ø8.376) |
add_hole_on_face(diameter_mm, face, x_mm, y_mm, z_mm, depth_mm, name) | Round hole on ANY planar face at a 3D point, through or blind (side holes, heat-set insert holes); the face through the point is used |
add_hole_wizard(kind, size, face, x_mm, y_mm, z_mm, depth_mm, fit, thread, name) | ISO hole from SolidWorks' Hole Wizard tables: clearance (ISO 273 fits), counterbore, countersink or tapped; thread="modeled" cuts a real, printable thread |
add_boss_on_face(diameter_mm, face, x_mm, y_mm, z_mm, height_mm, name) | Round boss (standoff, peg) grown out of ANY planar face |
add_extruded_profile_on_face(points_mm, face, depth_mm, name, corner_radii_mm) | Polygon pad/ledge grown out of ANY planar face (3D points on the face) |
add_text_on_face(text, face, x_mm, y_mm, z_mm, height_mm, depth_mm, emboss, font, name) | Engrave text into ANY planar face, or emboss it: labels, version numbers; the position is two dimensions |
cut_profile(points_mm, depth_mm, name, corner_radii_mm, rotate_deg, about_mm) | Cut a polygon pocket/slot from the +Z face (blind or through), optionally turned about a pivot |
cut_profile_on_face(points_mm, face, depth_mm, name, corner_radii_mm) | Cut a polygon pocket on ANY face (3D points on the face) |
cut_profile_through_plane(points_mm, plane, depth_mm, name, corner_radii_mm) | Cut a polygon drawn on the Front/Top/Right plane or a plane by name, through all both ways or depth_mm centred on the plane (wedges, side windows, symmetric recesses); keep_inside keeps the profile instead, so two views make a 3D shape |
cut_offset_pocket(face, x_mm, y_mm, z_mm, rim_mm, depth_mm, name) | Pocket a face leaving a rim along its outline (I-beam web, tray, frame); rim and depth are dimensions |
cut_slot(length_mm, width_mm, x_mm, y_mm, angle_deg, depth_mm, name) | Cut a straight slotted hole (obround) on the +Z face at any angle |
add_extruded_slot(start_mm, end_mm, width_mm, depth_mm, name) | Extrude a stadium (rounded tab, lug, link) between two points, the round ends centred on them |
add_fillet(radius_mm, edges, name, radii_at_mm) | Round edges (edges: all, axis x/y/z, a face outline "+z:outline", one feature's edges "feature:Boss", or indices "2,5"); radii_at_mm varies the radius from end to end |
add_full_round(face, x_mm, y_mm, z_mm, name) | Round a rib's top off completely between its two closest opposite sides |
add_chamfer(distance_mm, edges, name) | Chamfer edges at 45° (edges: all, axis, a face outline, a feature's edges, or indices) |
add_shell(thickness_mm, open_face) | Hollow to a wall thickness; open a face (+z/…) or none |
add_linear_pattern(count, spacing_mm, direction, feature_name) | Repeat a feature N times along +x/-x/… |
add_circular_pattern(count, center_x_mm, center_y_mm, feature_name) | Repeat a feature N times around an axis (bolt circle) |
add_mirror(plane, offset_mm, features, name) | Mirror features (copies follow their seeds) or the whole body about the Front/Top/Right plane, or a plane by name, moved offset_mm; fails when a copy would land outside the part |
set_dimension(dimension_name, value_mm) | Change a named driving dim (e.g. D1@BlockExtrude, or any name a tool returned in dimensions), rebuild, remeasure; an angle in degrees |
set_equation(equation) | Add a global equation or variable linking dims (e.g. "W" = 40, then "width@Sketch1" = "W") |
slice_mesh(path, axis, heights_mm, frame) | Cross-sections of an STL/3MF mesh as polygon loops, ready to use as profiles |
compare_with_mesh(path, axis, heights_mm, frame, offset_mm) | Compare the part's cross-sections with a reference mesh (area and extent differences) |
read_sketch(name) | A sketch read back in model coordinates: lines, arcs, circles, splines, its dimensions, fully defined or not |
add_sketch(plane, start_mm, segments, name) | Sketch an outline of lines, arcs and splines on any plane, fully defined: tangent where it flows, dimensioned from the origin |
extrude_sketch(sketch, depth_mm, reverse, name) / cut_sketch(sketch, depth_mm, reverse, name) | Build on an existing sketch by name (one a person drew): extrude it, or cut it blind or through all |
list_dimensions() | Every dimension in the part: name (for set_dimension), feature, value, unit |
list_features() | The part's history in tree order (name, type, suppressed); flags features that fail to rebuild and sketches that are not fully defined |
delete_feature(name, with_children) | Undo a step: delete a feature with its sketch; refuses (and names them) while other features depend on it, unless with_children |
suppress_feature(name, suppress) | Take a feature out but keep it and its dimensions (try a variant); suppress=False brings it back with its dependents |
set_material(name, database) | Assign a material (e.g. 6061 Alloy) so mass/density are real |
rebuild(top_only) | Force rebuild, report errors |
get_mass_properties | Volume, mass, density, surface area, centre of mass, bounding box |
get_bounding_box | Tight part bounding box (min/max/size, mm) |
list_faces(component) / list_edges | Inspect faces (normal/area/centre; a cylinder's axis, radius and centre, also of a component in an assembly) and edges (type/ends/axis/length) by index |
check_printability(up, overhang_deg, min_wall_mm) | For a print direction: overhanging faces (area, worst lean, centre), bed contact, height; with min_wall_mm the walls thinner than that |
export(path, file_format, quality, deviation_mm, angle_deg) | STEP/STL/IGES/Parasolid/3MF (silent; verifies file). STL/3MF tessellation: quality coarse/fine, or explicit deviation_mm+angle_deg |
screenshot(path, view, zoom_mm) | PNG/BMP/JPG from a standard view (iso, front, top, …), zoomed to fit or onto a region |
make_drawing(path) | 2D drawing as PDF or editable .slddrw: front, top, right (first angle) and isometric views on A4 with the model's own dimensions, each once |
save_part(path) / open_part(path) | Save to / open a native .sldprt; open_part also imports STEP, IGES and Parasolid files as a part to build on |
close_part(save) | Close the current part or assembly; without one, SolidWorks' active document if it is saved |