What it can do
121 tools for sketches, parts, sheet metal, weldments, assemblies, drawings and export. Just ask in plain language.
Documents and measuring 22
Open, save and inspect; measure volume, mass, distances and faces; read and set file properties.
The 22 tools
capture_viewCapture a PNG of the active document's graphics view, to inspect the model visually.clear_selectionEmpty the current selection.close_documentClose the current document.connect_solidworksAttach to the running SolidWorks, or start it first when none is running.copy_fileCopy a file to a new path, keeping the extension.create_new_assemblyCreate an empty assembly from the default template and make it the active document; the result names the template's units and standard.create_new_partCreate an empty part from the default template and make it the active document; the result names the template's units and standard.get_document_infoReport the active document's title, file path ('Not saved' when it has none) and type.get_solidworks_infoReport the SolidWorks installation, the server's version, the settings and log file it uses, and any tool modules that failed to load.list_custom_propertiesList the custom properties of the active document.list_edgesList the edges of the solid body.list_facesList the faces of the solid body.list_open_documentsList every document that is open in SolidWorks.measure_distanceMeasure between two model points, or between the two faces or edges at those points.measure_partMeasure the part: volume, mass, surface area, centre of mass and size.open_documentOpen a SolidWorks file and make it the active document.save_documentSave the current document.select_edgesSelect body edges by geometry (the view does not matter), ready for fillet_edges / chamfer_edges.select_facesSelect body faces by geometry (the view does not matter).set_custom_propertiesSet or delete custom properties of the active document (part, assembly or drawing).set_unitsSet the default length unit, mm, inch, cm or m, used when a tool's unit input is left out.solidworks_guideRead how to operate SOLIDWORKS through these tools: recipes, pitfalls and limits.
Sketches 20
Lines, arcs, circles, slots, polygons and splines, fully defined from your own dimensions.
The 20 tools
add_sketch_dimensionAdd a driving dimension in the open sketch and optionally set its value.add_sketch_relationAdd a geometric relation in the open sketch.close_sketchExit the open sketch, rebuilding the features made from it.create_offset_planeCreate a reference plane parallel to a plane or to a flat face of the body, at a given distance.create_sketchStart a sketch on one of the model's planes (Front, Top, Right or a plane by name).create_sketch_on_faceStart a sketch on the flat body face that contains a given 3D model point (found by geometry, so the current view does not matter).draw_arcAdd an arc to the open sketch from its centre, radius and start / end angles (degrees), counter-clockwise from start to end.draw_centerlineAdd a centerline (a construction line) to the open sketch.draw_circleAdd a circle to the open sketch, given its centre (x, y) and radius.draw_lineAdd a line to the open sketch at exactly the coordinates given.draw_pointAdd a sketch point at x, y in the open sketch.draw_polygonAdd a regular polygon whose corners lie on a circle of the given radius; the first corner is at angle 0.draw_polylineAdd a chain of lines through the points given, in one call.draw_rectangleAdd a rectangle in the open sketch between opposite corners (x1, y1) and (x2, y2).draw_slotAdd a straight slot to the open sketch.edit_sketchReopen an existing sketch (for example 'Sketch1') for editing.fit_splineIn the open sketch, replace a chain of lines and arcs with ONE spline that follows them within a tolerance (default 0.001 mm).fully_define_sketchLast resort, after your own dimensions: let SOLIDWORKS add what is still missing to define the open sketch (reported as added by SOLIDWORKS).get_sketch_statusReport the open sketch's state: fully defined, under defined or over defined.list_sketch_entitiesList the open sketch's entities (ids, coordinates, sizes), dimensions, relation count and definition status (under_defined / fully_defined / over_defined).
Parts and weldments 26
Extrudes, cuts, revolves, sweeps, lofts, Hole Wizard holes, fillets, patterns, materials and frames.
The 26 tools
chamfer_edgesAdd an angle-distance chamfer to the selected edges.circular_patternPattern one or more features around a model axis through the origin (x, y or z), or around the axis of a cylindrical face or circular edge (axis_point).cut_extrudeCut the most recent sketch through the body to remove material.delete_equationDelete an equation or global variable by name or index (see list_equations) and rebuild.delete_featureDelete a feature, sketch or plane by name; in an assembly also a mate by name.extrude_sketchExtrude the most recent sketch as a boss (Boss-Extrude).extrude_surfaceExtrude the most recent sketch into a surface (Surface-Extrude).fillet_edgesAdd a constant-radius fillet to the selected edges (or to all edges of the selected faces).get_colorRead the colour (rgb 0 to 255) and transparency of the active part, or of components of the active assembly (all parts when none are named).get_cut_listRead the cut list of the active weldment part.hole_wizardMake a standard ISO Hole Wizard hole at a model point on a flat face.linear_patternPattern one or more features along the model axes, in one direction or two (a grid).list_dimensionsList the model's dimensions by feature, with the names set_dimension uses.list_equationsList the equations and global variables.list_featuresList the features of the active model as the feature tree shows them.list_materialsList materials from the SolidWorks material databases.loftLoft a solid through two or more closed profile sketches on different planes, in the order given.mirror_featureMirror one or more features about a plane (Front, Top, Right or any plane by name) or about a flat body face.revolve_sketchRevolve the most recent sketch about a centerline drawn in that sketch (draw_centerline).set_colorSet the colour of the active part, or of components of the active assembly.set_dimensionChange a dimension by name and rebuild the model.set_equationSet an equation and rebuild.set_materialAssign a material to the active part by its name from list_materials.shellHollow out the body, leaving walls of the given thickness.structural_memberMake weldment structural members along the lines and arcs of a sketch, from the installed profile library.sweepSweep a solid along a path sketch.
Sheet metal 12
Base flanges, edge flanges, hems, bends and forming tools, with the flat pattern as a DXF.
The 12 tools
convert_to_sheet_metalTurn the solid body of a part into sheet metal with SolidWorks' Convert to Sheet Metal.edge_flangeAdd an edge flange (a wall bent up) on the sheet metal edge through a point, with its length measured to the outer virtual sharp.export_flat_pattern_dxfExport the active sheet metal part's flat pattern as a DXF.flattenShow the flat pattern of the active sheet metal part (unsuppress it).forming_toolPress a forming tool from the installed design library into a sheet metal part.get_sheet_metal_infoRead the active part's sheet metal settings (read only).hemFold a sheet metal edge back on itself (a hem), inside the old edge.miter_flangeAdd a miter flange.sheet_metal_base_flangeMake the first feature of a sheet metal part from a sketch.sketched_bendBend sheet metal along the single line of a sketch on its flat face, toward the sketch's side (reverse bends the other way).tabAdd a tab to a sheet metal part.unflattenFold the active sheet metal part again (suppress its flat pattern).
Assemblies 20
Insert and mate components, check interference, replace parts and make exploded views.
The 20 tools
add_componentInsert a saved part or sub-assembly file into the active assembly, with the centre of its bounding box at x, y, z.add_mateAdd a mate in the active assembly between two references.check_interferenceRun SolidWorks' interference check on the whole active assembly (parts inside sub-assemblies are checked one by one).create_exploded_viewMake a new exploded view of the active assembly.delete_componentDelete a top-level component from the active assembly.delete_mateDelete a mate by name (delete_feature also finds mates).edit_mateChange an existing mate.list_component_facesList the faces of one component of the active assembly.list_component_sketchesList the sketches of one component of the active assembly.list_componentsList the top-level components of the active assembly.list_matesList every mate of the active assembly.move_componentMove a floating top-level component to a position and orientation in the assembly.replace_componentReplace a top-level component of the active assembly by another part or assembly file.set_component_fixedFix a top-level component of the active assembly where it is, or release it (fixed = false).set_component_visibilityHide or show components of the active assembly (visible = false hides).set_subassembly_solvingMake a sub-assembly component rigid or flexible in the active assembly.show_explodedShow the active assembly's exploded view exploded (exploded true) or collapsed (false).step_mateStep a distance or angle mate through a list of values, optionally saving a picture and counting interferences at each step.suppress_mateSuppress a mate.unsuppress_mateTurn a suppressed mate back on and rebuild.
Drawings 18
Sheets, views, sections and details, dimensions, balloons and a bill of materials.
The 18 tools
activate_sheetMake another sheet of the active drawing the active one.add_balloonsAdd item balloons to a view of an assembly in the active drawing.add_bom_columnAdd a column to the drawing's bill of materials (add_bom_table) that shows a custom property of each item.add_bom_tableAdd a bill of materials table to a drawing of an assembly.add_center_marksAdd centre marks to a drawing view.add_centerlinesAdd centrelines to a drawing view.add_detail_viewAdd a detail view to the active drawing.add_drawing_dimensionAdd 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).add_section_viewAdd a section view to the active drawing by cutting an existing view along a straight line.add_sheetAdd a sheet to the active drawing, after the last one, and make it active.arrange_dimensionsSpread the dimensions of a drawing view (or of every view) so they stop overlapping; use it after create_drawing(dimensions=true) or after adding dimensions.create_drawingCreate a drawing of a saved part or assembly.delete_drawing_dimensionDelete a dimension from a drawing view by its name.list_drawing_viewsList the views of the active drawing.move_drawing_viewMove a drawing view so that its outline centre (see list_drawing_views) lands at x_sheet, y_sheet (mm from the lower left corner).set_dimension_precisionSet how many decimals drawing dimensions show.set_dimension_styleChange how a drawing dimension looks.set_title_blockPut a title block in the bottom right corner of the active sheet, or update the one already there (title, drawn by, date, scale, material, sheet size).
Export 3
PDF, STEP and STL, for the workshop, a supplier or a 3D printer.
The 3 tools
export_pdfExport the active drawing as a PDF.export_stepExport the active part or assembly as a STEP file (.step / .stp) for other CAD programs.export_stlExport the active part or assembly as an STL file (.stl) for 3D printing or meshing.
What it cannot do
- Path, slider, lock-to-sketch and magnetic mates, and routing: SOLIDWORKS does not offer them to add-on programs.
- Drawing views at an oblique angle (save a named view in the model instead).
- Hole Wizard holes other than ISO; linear patterns along anything but the model axes.
- Weldments: trim / extend, end caps, gussets, rotating a profile or moving its pierce point. Forming tools only in their library sizes.
- A flat-pattern view or a cut-list table on a drawing (the assistant reads the cut list instead).
- Work while SOLIDWORKS shows a dialog: answer it in SOLIDWORKS, then try again.