AlphaPrism is in active development: features may change and you may run into bugs. Keep backups of your work.Known issuesReport a bug
Skip to content

Automation tools ​

Prism exposes 81 automation tools. Call them from Python with cad.call("name", **args), over HTTP with POST /call, or from an AI assistant through the MCP bridge (call_api). Sizes are millimetres with Z up. Face and edge indices are 1-based, like the labels in the app; Freeform cage indices are 0-based.

Inspect the document ​

get_state ​

Full snapshot: objects (with bounding boxes), selection, active command and its parameters/slots, sketch, camera, display flags, status line.

ArgumentTypeDescription
fieldsarrayOnly these top-level keys, e.g. ["objects","selection","status"]. Default: all.
objectsstringfull (default) | names (one 'name [kind]' string per object, far smaller) | none.
limitintegerMost objects to list; objectsTotal gives the real count.

object_info ​

Detailed information about one object: volume, area, size, center, validity, sketch plane.

ArgumentTypeDescription
object requiredstringObject name.

get_log ​

Recent status/error messages shown in the status bar (newest last).

ArgumentTypeDescription
countintegerHow many entries (default 30).

screenshot ​

Capture the app window as a PNG. Whole window by default (ribbon, panels, viewport); viewport:true captures only the 3D view, which is what you usually want to judge a model and costs far fewer tokens. max_width shrinks the picture (e.g. 900). To judge a shape, pass views (front, back, left, right, top, bottom, iso; default front/right/top/iso): one labelled sheet of orthographic pictures at a common scale of just the objects named in object (a name or list; default every visible object), shaded without grid. The camera, display and visibility are restored afterwards. The reply gives each view's axes, pixelsPerMm and the bounds.

ArgumentTypeDescription
viewportbooleanOnly the 3D viewport.
max_widthintegerScale down to at most this many pixels wide.
wait_msintegerMilliseconds to wait for a fresh frame before capturing (default 250).
viewsarrayStandard views to combine into one labelled sheet: front, back, left, right, top, bottom, iso. An empty list means front, right, top, iso.
objectanyWith views: show only this object name (or a list of names).
displaystringWith views: shaded (default) | shaded_edges | wireframe.
cell_widthintegerWith views: width of each picture in pixels (default 480).
columnsintegerWith views: pictures per row (default 2).

wait_idle ​

Wait until the view has stopped animating (after view, a tool that turns the camera, Tab in 3D sketch...) so the next pointer event or screenshot sees the final camera. Optional extra ms to wait afterwards.

ArgumentTypeDescription
timeout_msintegerLongest wait (default 3000).
extra_msintegerExtra pause after it settles (default 100).

solid_find ​

Find faces or edges of a solid/surface by geometry instead of by index. kind: faces (default) | edges. Filters (all optional, AND): type (Plane, Cylinder, Cone, Sphere, Torus, ... for faces; Line, Circle, ... for edges; prefix match), facing [dx,dy,dz] + angle (faces whose normal is within angle degrees, default 5), direction [dx,dy,dz] + angle (straight edges parallel to it, default 5), radius (+ radius_tol, default 0.001), box [[x0,y0,z0],[x1,y1,z1]] (centre inside), near [x,y,z] + distance (centre within distance), of_face N (edges bounding face N, 1-based), min_size / max_size (area for faces, length for edges). sort: size | -size | x | -x | y | -y | z | -z (centre coordinate), limit (default 40). select:true selects the hits (and they are listed 1-based, ready for run_command slots {object, face|edge}). summary:true returns only counts per type. Returns total, shown and the hits with type, centre, area/length, normal/direction, radius.

ArgumentTypeDescription
object requiredstringObject name.
kindstringfaces | edges.
typestringSurface/curve type.
facingarrayFace normal direction.
directionarrayStraight-edge direction.
anglenumberTolerance in degrees for facing/direction.
radiusnumberRadius of cylindrical/spherical faces or circular edges.
radius_tolnumberRadius tolerance.
boxarrayCentre must lie inside this box.
neararrayPoint for distance filter.
distancenumberMax centre distance from near.
of_faceintegerOnly edges of this face (1-based).
min_sizenumberMin area/length.
max_sizenumberMax area/length.
sortstringSort order.
limitintegerMax hits listed (default 40).
selectbooleanSelect the hits.
summarybooleanCounts only.

solid_check ​

Cheap verification of a body, or measurement between two things. With only 'object': validity, volume, area, bounding box, size, centre of mass, counts of faces/edges/shells/solids and open (free) edges. With 'a' and 'b' (each an object name or {object, face|edge}): the minimum distance between them and the two closest points; if they overlap, 'overlap' is true and the volume of the overlap is reported when both are solids.

ArgumentTypeDescription
objectstringObject to check (also used as 'a' when only 'b' is given).
aanyFirst item for a distance.
banySecond item for a distance.

Commands and the ribbon ​

list_commands ​

List the command names run_command accepts, optionally only those containing 'query' (case-insensitive). Without a query returns the count and the first 60.

ArgumentTypeDescription
querystringText the name contains, e.g. 'fillet' or 'cam'.
limitintegerMost names to return (default 60).

describe_command ​

What a command needs before you run it: its selection slots (what each accepts, whether it is optional or takes several) and its parameters (type, default, unit, range, options). Nothing is started or changed. Then pass slots and params to run_command using these labels.

ArgumentTypeDescription
name requiredstringCommand name from list_commands.

run_command ​

Run a modeling command end-to-end: start it, fill selection slots and parameters, then (by default) commit. Find names with list_commands(query). 'slots' maps a slot label to an object name, {object,face|edge} or an array of those; 'params' maps parameter labels to values. For curve_control/curve_through pass 'points' as [[x,y,z],...]. Use get_state afterwards, or call with commit=false to preview first.

ArgumentTypeDescription
name requiredstringCommand name.
slotsobjectSlot label -> selection.
paramsobjectParameter label -> value.
pointsarrayCurve points for curve_control / curve_through.
commitbooleanCommit immediately (default true).

command_set ​

Change parameters and/or selection slots of the command currently open in the panel (live preview updates).

ArgumentTypeDescription
paramsobjectParameter label -> value.
slotsobjectSlot label -> selection.

command_commit ​

Press OK on the active command.

No arguments.

command_cancel ​

Cancel the active command (or the sketch if one is open and no command is active).

No arguments.

list_ribbon ​

List every ribbon tab, group and button (label, enabled, checked). Use with ribbon_click.

No arguments.

ribbon_click ​

Click a ribbon button by its label (exactly what a user would click). Optionally pass 'tab' to disambiguate (e.g. 'Extrude' exists on Solid and Surface). Commands open their panel; use command_set / command_commit next.

ArgumentTypeDescription
label requiredstringButton label, e.g. 'Box', 'Create Sketch', 'Finish Sketch'.
tabstringTab name, e.g. 'Solid', 'Surface', 'Freeform'.

marking_menu ​

The right-click marking menu. action: settings (open the Settings window) | menu (the 6 o'clock plain menu) | list (the eight entries for what is selected right now, clockwise from the top), open (show it at x,y in the viewport), run (index 0-7: do that entry).

ArgumentTypeDescription
action requiredstringlist | open | run
indexintegerEntry 0-7 for run.
xnumberViewport x for open.
ynumberViewport y for open.

edit_feature ​

Edit an earlier feature (the model rolls back to before it and its command reopens with the same picks and numbers; change values with command_set, then command_commit rebuilds the later steps). action: list (steps that can be edited) | open (step = history step id; omitted = the step that made the selected object).

ArgumentTypeDescription
action requiredstringlist | open
stepintegerHistory step id from list or history_tree.

Objects and selection ​

select ​

Set the document selection (outside of commands). Items are object names, or {object, face} / {object, edge} (1-based).

ArgumentTypeDescription
items requiredarraySelection items.
additivebooleanAdd to the existing selection.

object_update ​

Rename, recolor or show/hide an object.

ArgumentTypeDescription
object requiredstringObject name.
namestringNew name.
colorstringHex colour like #E5484D.
visiblebooleanVisibility.

delete_objects ​

Delete objects by name.

ArgumentTypeDescription
objects requiredarrayObject names.

origin ​

Show or hide the origin helpers (they also appear in the browser): planes, axes, origin point.

ArgumentTypeDescription
planesbooleanXY/XZ/YZ planes.
axesbooleanX/Y/Z axes.
pointbooleanOrigin point.

Sketching ​

sketch_begin ​

Start a sketch. plane: 'XY', 'XZ' or 'YZ' (optional offset along the normal), a planar face {object, face}, or an origin plane name. To edit an existing sketch pass edit:'Sketch 1' (its constraints and dimensions are preserved).

ArgumentTypeDescription
planeany'XY' | 'XZ' | 'YZ' | the name of a construction plane |
offsetnumberOffset along the plane normal (mm).
editstringName of an existing sketch object to edit.
look_normalbooleanAlign the camera when starting; false preserves the current 3D view.

sketch_plane ​

Control the unified sketch work plane. Actions: select (1-based index), new, xy, xz, yz, origin ([x,y,z] mm), rotate ([x,y,z] world degrees), size (display multiplier), snapping (other_curves and project), normal, gizmo, edit. Existing curves retain their original drawing planes.

ArgumentTypeDescription
action requiredstringPlane action.
indexinteger1-based plane index.
valueany[x,y,z] for origin/rotate; number for size.
other_curvesbooleanEnable external curve snaps.
projectbooleanAllow explicitly labeled off-plane projection.

sketch_add ​

Add geometry to the open sketch using the same tools as the mouse (so auto-constraints apply: coincident joints, horizontal/vertical, tangents...). Coordinates are 2D [u,v] on the sketch plane. Entity types: line {points:[[u,v],[u,v]]}; polyline {points, closed?}; rect {corner1, corner2} | {center, corner} | {points:[p1,p2,p3]} (3-point); circle {center, radius} | {points:[p1,p2]} (2-point) | {points:[p1,p2,p3]} (3-point); arc {points:[start,mid,end]} | {center, start, end}; ellipse {center, major:[u,v] (end of one axis), minor (other radius)}; line also takes midpoint:true ([middle, end]); polygon {center, radius, sides, circumscribed?}; slot {center1, center2, width}; spline {points, closed?, control?}; point {at:[u,v]}; text {text, at:[u,v] (lower-left of the first line, default [0,0]), height? (mm, default 10), font? (an installed font, default Arial), bold?, spacing? (extra letter spacing, mm); line breaks start a new line}. Add "construction":true for reference geometry.

ArgumentTypeDescription
entities requiredarrayList of entity objects.

sketch_state ​

The open sketch's model: points, entities (ids), constraints and dimensions, degrees of freedom and solver status. Refs use 'p<id>' for points and 'e<id>' for entities.

No arguments.

sketch_constrain ​

Add a geometric constraint. type: horizontal | vertical | coincident | parallel | perpendicular | tangent | equal | midpoint | concentric | collinear | symmetric | fix. refs: ids like 'e3' (entity) and 'p5' (point) - e.g. horizontal ['e3'] or ['p1','p2']; coincident ['p1','p2'] or ['p1','e4'] (point on curve); parallel ['e1','e2']; midpoint ['p3','e1']; symmetric ['p1','p2','e5']; fix ['p1'] or ['e2'].

ArgumentTypeDescription
type requiredstringConstraint type.
refs requiredarrayPoint/entity ids, e.g. ["e1","p3"].

sketch_dimension ​

Add a driving dimension; the sketch is solved to match. type: length (line) | distance (two points) | hdistance | vdistance | radius | diameter | angle (two lines, degrees) | point_line. refs like constrain. value in mm (or degrees).

ArgumentTypeDescription
type requiredstringDimension type.
refs requiredarrayIds, e.g. ["e1"] or ["p1","p2"].
value requirednumberTarget value.

sketch_set_dimension ​

Change the value of an existing dimension (by constraint id from sketch_state) - the sketch updates parametrically.

ArgumentTypeDescription
constraint requiredintegerConstraint id.
value requirednumberNew value.

sketch_project ​

Bring geometry from outside into the open sketch (locked in place). mode edge: project one edge of an object (object name or id, edge index) | body: project all edges of an object | section: the curves where an object crosses the sketch plane. Good for lofts: copy or slice an existing body to get matching profiles.

ArgumentTypeDescription
object requiredstringObject name or id.
mode requiredstringedge | body | section
edgeintegerEdge index (edge mode).

sketch_mirror ​

Mirror sketch entities across a line entity. live=true keeps the copy tied to the original with symmetry constraints.

ArgumentTypeDescription
entities requiredarrayEntity ids like ['e3','e4'].
axis requiredstringLine entity id to mirror across, like 'e7'.
livebooleanKeep symmetric (default true).

sketch_trim ​

Trim a line, arc or circle: removes the part of curve 'e3' nearest to the point at:[u,v], cutting back to the crossing curves on each side (a curve nothing crosses is deleted).

ArgumentTypeDescription
entity requiredstringEntity id like 'e3'.
at requiredarrayPoint [u,v] on the part to remove.

sketch_pattern ​

Repeat sketch entities. type linear: offset [du,dv] between copies. type circular: center [u,v] and optionally angle (degrees between copies; default = evenly around 360). count = total copies including the original.

ArgumentTypeDescription
entities requiredarrayEntity ids like ['e3','e4'].
type requiredstringlinear | circular
count requiredintegerTotal copies including the original.
offsetarrayLinear: [du,dv].
centerarrayCircular: [u,v].
anglenumberCircular: degrees between copies.

sketch_delete ​

Delete sketch entities ('e3') or constraints (by id).

ArgumentTypeDescription
entitiesarrayEntity ids, e.g. ["e3"].
constraintsarrayConstraint ids (integers).

sketch_input ​

Drive the open sketch like the mouse and keyboard. Optionally pick a tool (line, line_mid, rect, rect_center, rect_3pt, ellipse, circle, circle_2pt, circle_3pt, polygon, slot, spline, spline_control, edit_spline, select, fit_section_curve, constrain:<type>), then send events: {type:'move'|'down'|'up'|'click'|'dclick'|'key', u, v (sketch plane coords), shift, alt} or {type:'key', key:'Char:5'|'Tab'|'Enter'|'Escape'|'Back'|'Delete'|'RightClick'|'Char:L'|'Char:C'|'Char:X'}. Returns the on-screen read-out labels, the status line and the sketch state.

ArgumentTypeDescription
toolstringTool to activate first.
eventsarrayList of event objects.
typestringEvent types, see above.

sketch_finish ​

Finish the open sketch (keep=true creates/updates the Sketch object, false discards it). Returns a short status; verbose:true returns the whole document state.

ArgumentTypeDescription
keepbooleanDefault true.
verbosebooleanReturn the full state.

Freeform and NURBS ​

form_info ​

Read a Form object (subdivision cage): vertices, faces (vertex index lists, 0-based, CCW from outside), creased edges, smoothing level. Indices here are 0-based and are what form_op expects.

ArgumentTypeDescription
object requiredstringForm object name.
summarybooleanCounts and bounding box only (no vertex or face lists).
onlyarrayVertex indices: return only the positions of these vertices.

form_find ​

Find cage components by geometry so you do not have to read the whole cage. kind: vertices | faces | edges (default faces). Filters (all optional, combined with AND): box [[x0,y0,z0],[x1,y1,z1]] (a vertex, or a face/edge centre, inside), near [x,y,z] + radius, facing [dx,dy,dz] + angle (faces whose normal is within angle degrees, default 30), open:true (edges used by one face only), all:true. Returns 0-based indices ready for form_op / form_select, with centres (and normals for faces).

ArgumentTypeDescription
object requiredstringForm object name.
kindstringvertices | faces | edges.
boxarray[[x0,y0,z0],[x1,y1,z1]]
neararray[x,y,z]
radiusnumberWith near: distance (mm).
facingarrayFaces whose outward normal points this way [dx,dy,dz].
anglenumberWith facing: tolerance in degrees (default 30).
openbooleanEdges with one face only (boundary).
allbooleanEvery component.
limitintegerMaximum results (default 200).

form_analyze ​

Surface quality of a Form: cage statistics (quads, triangles, n-gons, poles with their positions, edge lengths, stretched quads), curvature of the smooth surface (mean, tightest radius and where), and optionally the deviation to a reference object (scan, body, form): within-tolerance percentage, RMS, bias, largest gaps. display:true also colors the form by that deviation in the viewport.

ArgumentTypeDescription
object requiredstringForm object name.
referencestringObject to compare the smooth surface with.
tolerancenumberDeviation tolerance in mm (default 0.2).
rangenumberColor range ± in mm (default 1).
displaybooleanColor the form by deviation.
polesbooleanInclude pole positions (default true).

form_op ​

Edit a Form cage (undoable). op: chamfer (edges or faces, amount: replaces each inner edge with a strip of faces) | slide (edges, amount -1..1: slide an edge loop along its rails) | crease_vertices (vertices, value: sharp corner points) | set_symmetry (symmetry x|y|z|radial:N|off, enforce:true makes the cage exactly symmetric from the + side, keep_positive:false for the - side) | move | rotate | scale | bridge | fill_holes | merge_faces | merge_edges | unweld_edges | pull | collapse_edges | split_face | smooth | flatten | set_vertices | extrude_faces | extrude_edges | inset | bevel | insert_loop | subdivide | delete_faces | weld | flip | crease | mirror | add_face | thicken | level. A form with a persistent symmetry (set_symmetry) repeats extrude/inset/bevel/delete/crease/flatten/smooth/weld/collapse/unweld/pull/insert_loop/merge_faces on the mirror images of whatever you select; pass symmetry:off to bypass it for one call. pull: vertices (or all) move onto the smooth limit surface (strength 0..1). merge_edges: edges:[[a,b]..] removes inner edges, joining the faces either side. unweld_edges: edges (or faces) split the cage along them so each side gets its own points. bridge: faces:[a,b] removes two separate equal-corner cap faces and joins their loops (for integrated handles), or edges:[[a,b],...] selects two separate boundary chains. move/rotate/scale act on the vertices of whatever you select and accept soft_radius (+ falloff smooth|linear|sharp) and symmetry (x | y | z mirror, or radial:N around Z; mirrored points follow). rotate: axis X|Y|Z, angle (degrees), optional pivot [x,y,z] (default the selection centre). scale: factor, or scale [sx,sy,sz], optional pivot. inset: faces, amount, optional depth and individual:true. bevel: edges or faces, amount (support loops that tighten the edge). insert_loop: edge [a,b], optional count and position (0..1 from a). Components are 0-based indices from form_info: vertices:[i..], faces:[i..], edges:[[a,b]..]. move: delta [dx,dy,dz] applied to the vertices of whatever you select. set_vertices: positions {"3":[x,y,z]}. extrude_faces/edges: distance. insert_loop: edge [a,b]. crease: value (0 clears). mirror: plane XY|XZ|YZ (welds the seam). add_face: vertices [ids] and/or points [[x,y,z]] (new corners) - ids first. level: value 1-4.

ArgumentTypeDescription
object requiredstringForm object name.
op requiredstringOperation.
verticesarrayVertex indices.
facesarrayFace indices.
edgesarrayEdges as [a,b] pairs.
edgearrayOne edge [a,b].
deltaarray[dx,dy,dz].
distancenumberExtrude distance.
valuenumberCrease sharpness or smoothing level.
planestringMirror plane.
positionsobjectVertex index -> [x,y,z].
pointsarrayNew corner points.
anglenumberrotate: degrees.
axisstringrotate: X | Y | Z.
factornumberscale: uniform factor.
scalearrayscale: [sx,sy,sz].
pivotarrayrotate/scale pivot [x,y,z].
soft_radiusnumberSoft selection radius (mm; 0 = off).
falloffstringsmooth | linear | sharp.
symmetrystringx | y | z | radial:N | off.
allbooleanmove/rotate/scale/smooth/flatten: act on every vertex when nothing is selected.
amountnumberinset / bevel size (mm).
depthnumberinset: push out (+) or in (-).
individualbooleaninset each face on its own.
countintegerinsert_loop: number of loops.
positionnumberinsert_loop: 0..1 from the first vertex of the edge.

form_select ​

While Edit Freeform is open (run_command edit_form with commit=false), select cage components so the manipulator and highlights show. mode: vertices|edges|faces. Indices are 0-based as in form_info.

ArgumentTypeDescription
mode requiredstringvertices | edges | faces
allbooleanSelect every component of that kind.
opstringgrow | shrink | invert | all | angle (flood faces from the selection) | boundary | creased: selection tools applied after any indices given.
anglenumberWith op angle: dihedral limit in degrees (default 30).
verticesarrayVertex indices.
edgesarray[[a,b],..]
facesarrayFace indices.

form_to_nurbs ​

Convert a Form into exact NURBS geometry (a solid if the cage is closed, otherwise a surface). The result can be used with booleans, fillets, STEP export, etc.

ArgumentTypeDescription
object requiredstringForm object name.
detailstringexact (default) | fewer: one fitted patch per irregular face instead of four, for lighter models.

get_control_points ​

Read the NURBS control net of a curve or single-patch surface (rows x cols, row-major).

ArgumentTypeDescription
object requiredstringObject name.

set_control_points ​

Replace the control points of a curve/surface (same count and order as get_control_points). Undoable.

ArgumentTypeDescription
object requiredstringObject name.
points requiredarray[[x,y,z],...] - same length as get_control_points.

Viewport and input ​

view ​

Control the camera and display. preset: front|back|left|right|top|bottom|iso. Or yaw/pitch in degrees. fit=true zooms to extents.

ArgumentTypeDescription
presetstringStandard view.
yawnumberYaw degrees.
pitchnumberPitch degrees.
fitbooleanZoom to extents.
orthographicbooleanProjection.
displaystringshaded | shaded_edges | wireframe
xraybooleanEnable or disable translucent X-ray, independently of display style.
zebrabooleanZebra stripes.
gridbooleanGrid visibility.
select_modestringobject | face | edge
distancenumberCamera distance.
targetarrayCamera target [x,y,z].
look_atbooleanLook straight at the selected plane, face or sketch (or the open sketch).
layoutstringsingle | dual (model + top) | quad (front, right, top + model)
linkbooleanLink pan/zoom between the views of a multi-view layout.

pointer ​

Send mouse events to the 3D viewport at world positions: events [{type:'move'|'down'|'up'|'click'|'dclick'|'drag', x,y,z, x2,y2,z2 (drag end)}]. A {type:'key', key:'Char:E'|'Tab'|'Enter'|...} event sends a viewport key. Returns the active command's first grab handle (origin, tip, value), every handle (label, origin, grip, value), the command gizmo (mode, center, arrow length, a grab point per axis, values) and the camera.

ArgumentTypeDescription
events requiredarrayEvent objects.

Documents, files and history ​

file ​

Document I/O. action: new | open | save | save_as | import_step | import_file (by extension: STEP, IGES, BREP, DXF, STL, OBJ, PLY, 3MF) | export_step | export_iges | export_brep | export_glb | export_dxf | export_stl (also .3mf/.obj/.ply by extension). 'path' required except for new/save.

ArgumentTypeDescription
action requiredstringAction.
pathstringFile path.

document_new ​

Open a new empty document in its own tab.

No arguments.

document_list ​

The open documents (tabs).

No arguments.

document_switch ​

Bring a document tab to the front by index (0-based) or title.

ArgumentTypeDescription
document requiredstringIndex or title.

document_close ​

Close a document tab (discards unsaved changes).

ArgumentTypeDescription
document requiredstringIndex or title.

history ​

Undo or redo.

ArgumentTypeDescription
action requiredstringundo | redo
countintegerRepeat count (default 1).

history_group ​

Fold a run of steps into ONE undo step. Call with action:begin, make changes, then action:end with a label. Groups nest.

ArgumentTypeDescription
action requiredstringbegin | end
labelstringName of the history step (end).

history_view ​

Inspect or resize the design history panel. Collapsed mode shows a compact, interactive trail of the active branch.

ArgumentTypeDescription
expandedbooleanShow the full branch graph, or the compact trail when false.
heightnumberExpanded graph height, clamped to 100–360.

history_tree ​

The full history tree: every step with its parent, label, time, checkpoint name and which one is current. Branches exist when an edit was made after rolling back.

No arguments.

history_goto ​

Jump to a history step by id (see history_tree). Use this to switch between branches.

ArgumentTypeDescription
id requiredintegerNode id.

batch ​

Run several tool calls in order in one round trip. Stops at the first error. calls: [{tool, args}].

ArgumentTypeDescription
calls requiredarray[{"tool": "...", "args": {...}}, ...]

workspace ​

Switch workspace: design | drawing | scan | cae (or simulate) | assemble | render | ar | make | script | all. CAE includes Static, Thermal, Dynamics, Motion (kinematics and rigid-body motion of an assembly) and Fluids. make opens Manufacture/CAM.

ArgumentTypeDescription
id requiredstringWorkspace id; cae opens CAE, make opens CAM.

Materials, rendering and drawings ​

material_list ​

List library materials with engineering data (density g/cm3, modulus GPa, yield/tensile MPa, conductivity, expansion, max temp, ratings). Short by default (id, name, category, density); pass brief:false for the full engineering data. Optional 'category' or 'search' filter.

ArgumentTypeDescription
categorystringe.g. Steel, Aluminum, Plastic.
searchstringText to match in name, family or uses.
briefbooleanDefault true: id, name, category and density only.

material_apply ​

Give an object a library material (color, finish and density come with it), or just set its finish/color. 'material' is an id or name from material_list; explicit visual overrides survive material assignment. Omit it to only edit appearance. Returns the object's mass when it is a solid.

ArgumentTypeDescription
object requiredstringObject name.
materialstringMaterial id or name.
metalnumber0..1
glossnumber0..1
colorstringHex colour override like #C87941.
clearbooleanRemove the material.
patternstringAutomatic | Plain | Wood | Brushed | Cast | CarbonWeave. Appearance only.
patternScalenumberPattern size in mm, 0.1–10000.
patternAnglenumberPattern angle about world Z, degrees.
roughnessnumber0 polished to 1 matte; exclusive with gloss.
surfaceobjectReplace visual layers using SurfaceStyle JSON: Gradient 0..4, Axis 0..2, Color2/3/4 ARGB integers, GradientSize/Offset/Angle, Weathering 0..2, Coverage, PatchSize, WeatheringRoughness, BottomOnly, WeatherHeight, Seed, Bump, Coat, CoatRoughness, TextureSize/Angle and embedded ColorMap/RoughnessMap/BumpMap.
resetAppearancebooleanRestore assigned material/default appearance.

materials_panel ​

Open (open=true) or close the Materials workspace tab. Optionally select a library material in it.

ArgumentTypeDescription
openbooleanDefault true.
materialstringMaterial id to highlight in the list.

render_control ​

Inspect or control the current document's render. action: status | stop | save | close. Start with run_command(name=render, commit=false), then command_set parameters including 'Start render'. Status reports sample progress, completion and errors; save writes completed samples to PNG.

ArgumentTypeDescription
action requiredstringstatus | stop | save | close
pathstringOptional full PNG path for save.

drawing_export ​

Produce an engineering drawing of the model and save it as .svg, .pdf or .dxf (chosen by the extension). Hidden-line-removed orthographic views in third-angle layout (front, top, right, iso by default; first_angle:true to swap) at an automatic standard scale, with overall dimensions, hole callouts (Ø, count, THRU or depth), centerlines and locating dimensions, optional section and detail views, hand-placed annotations (dimension, diameter, radius, note, balloon, datum, gdt frames, surface finish), a bill of materials when several bodies are drawn, general tolerance and notes, and a title block. Drawn from the named objects, or every visible solid/surface/Freeform when none are named. View coordinates in sections/details/annotations are the view's drawing coordinates in mm: front x = model X, y = model Z; top x = X, y = Y; right x = Y, y = Z.

ArgumentTypeDescription
path requiredstringOutput file: .svg, .pdf or .dxf.
objectsarrayObject names to draw (default: all visible bodies).
viewsarrayfront | back | top | bottom | left | right | iso (default front, top, right, iso).
sheetstringA4 | A3 (default) | A2 | A1 | A0 | Letter | Tabloid | ANSI-C | ANSI-D.
scalenumberDrawing scale, e.g. 0.5 for 1:2 (default: automatic).
unitsstringmm (default) or in: dimension text units.
titlestringTitle (default: the object name).
part_numberstringPart number.
materialstringMaterial note (default: the first object's material).
drawn_bystringDrawn by.
companystringCompany name.
revisionstringRevision letter (default A).
notesarrayGeneral note lines.
tolerancestringGeneral tolerance text (default LINEAR ±0.1 ANGULAR ±0.5°).
dimensionsbooleanOverall dimensions (default true).
hole_calloutsbooleanØ callouts for holes and bosses (default true).
centerlinesbooleanCenterlines and center marks (default true).
locating_dimensionsbooleanHole position dimensions (default true).
first_anglebooleanFirst-angle projection.
bombooleanBill of materials table (default: when more than one part).
sectionsarraySection views: [{parent:'front', direction:'vertical'|'horizontal', offset: position in the parent view's mm coordinates (default the middle)}]. Lettered A-A, B-B, hatched, with the cutting line on the parent.
detailsarrayDetail views: [{parent:'front', center:[x,y], radius, ratio (magnification relative to the sheet scale, default 3)}].
annotationsarrayHand-placed items: {type: dimension|diameter|radius|note|balloon|datum|gdt|finish, view, from:[x,y], to:[x,y], at:[x,y], center:[x,y], radius, angle, offset, orientation: horizontal|vertical|aligned, text, tolerance (e.g. '+0.1/-0.05'), number (balloon), symbol (gdt: flatness, straightness, circularity, cylindricity, perpendicularity, parallelism, angularity, position, concentricity, symmetry, runout, total_runout, profile_line, profile_surface), datums:'A|B'}.

Meshes ​

mesh_import ​

Import a mesh file (STL, OBJ, PLY, 3MF) as one or more mesh objects. Without options it imports as-is (mm, Z-up, no repair). Colours and parts in the file are kept.

ArgumentTypeDescription
path requiredstringFull path of the file.
unitsstringauto (default: the 3MF's own unit, else mm) | mm | cm | m | inch.
up_axisstringz (default, keep) | y (rotate Y-up to Z-up) | x (rotate X-up to Z-up).
weld_tolerancenumberMerge vertices closer than this many mm (default 0: identical corners only).
auto_repairbooleanMerge, clean, fix normals and fill small holes (default false).
splitstringauto (default: 3MF objects become separate bodies) | none | groups (file parts: 3MF object, OBJ object/group, STL solid) | components (connected pieces).
reduce_percentnumberReduce faces on import: keep this percentage of the triangles (default: no reduction).
reduce_tointegerReduce faces on import to about this many triangles for the whole file (default: no reduction).

mesh_export ​

Export meshes/bodies to STL, 3MF, OBJ or PLY (chosen by the extension). Exports the selection, or everything when nothing is selected.

ArgumentTypeDescription
path requiredstringOutput path.

mesh_region ​

Select triangles on a mesh (the region later used by mesh_fit_surface, extract and delete). action: smart (flood a smooth patch from the triangle nearest 'at', with 'angle'), brush (triangles within 'radius' of 'at'), box (triangles whose centroid is inside 'min'/'max'), grow, shrink, invert, all, clear, extract (new mesh), delete. mode: replace (default) | add | subtract.

ArgumentTypeDescription
object requiredstringMesh object name.
action requiredstringsmart | brush | box | grow | shrink | invert | all | clear | extract | delete
atarray[x,y,z] point on or near the surface.
anglenumberEdge angle in degrees for organic surfaces (default 20).
tolerancenumberSurface tolerance in mm for the shape fit (default 0.3% of the mesh size).
radiusnumberBrush radius in mm.
minarray[x,y,z] box corner.
maxarray[x,y,z] box corner.
modestringreplace | add | subtract

Simulation and workflows ​

study_new ​

Start a static study on a solid body (the selected one, or the named one). Then add fixtures and loads with run_command sim_fixed / sim_roller / sim_force / sim_pressure / sim_torque / sim_gravity and call study_run.

ArgumentTypeDescription
objectstringBody name (default: the selection).
element_sizenumberTarget element size in mm (0 = automatic).

study_run ​

Mesh and solve the active study (blocks until done) and return the key results. Optionally switch the displayed result: von Mises, displacement, safety.

ArgumentTypeDescription
showstringvon Mises | displacement | safety

study_state ​

The active static study: fixtures, loads, mesh size and (if solved) the key results and notes.

No arguments.

cae_state ​

CAE solver status and results. Start cae_thermal or cae_modal with run_command(commit=false), configure body/faces/material and parameters, then command_set with 'Run analysis':true. action: status | stop. Case files remain in resultFolder. Fluids currently use the separate cae_pipe_flow reduced-order command.

ArgumentTypeDescription
actionstringstatus (default) | stop

workflow_state ​

Saved CAE setups, named selections, CAM setup and live path playback. Optional staticStudy selects a static study by name.

ArgumentTypeDescription
staticStudystringOptional saved static study name.

Scripts and the assistant ​

script_dialog ​

Show a dialog and wait for the user: fields [{key, label, type: number|text|check|choice, value, min, max, step, options, unit}]. Returns {ok:true, values:{key: value}} or {ok:false} when cancelled. Meant for scripts that need input.

ArgumentTypeDescription
titlestringDialog title.
fields requiredarrayField definitions.

assistant ​

Drive the in-app AI assistant panel (for testing the assistant itself). action: open | close | send (text) | transcript | new | provider (index 0 Codex login, 1 Claude API key, 2 OpenAI/Codex API key).

ArgumentTypeDescription
action requiredstringopen | close | send | transcript | new | provider
textstringMessage for send.
indexintegerProvider index.

Other ​

datum ​

Model datums and the move gizmo. action: arm (kind: point|axis|plane — the persistent click-to-place tool; click with the pointer tool), finish (stop placing), gizmo (show the free gizmo; move:true = the Move tool's grab mode), bind (bind the current selection to the gizmo), list (placed datums).

ArgumentTypeDescription
actionstringarm | finish | gizmo | bind | list.
kindstringpoint | axis | plane.
movebooleanArm Move mode on the gizmo.

drawing_document ​

Edit the Drawing workspace document using the same model and history as the desktop editor. Actions: state, new_sheet, sheet_settings, add_view, suggest, accept, move, update, parts, delete_annotation, export. New views have no automatic annotations. View kinds: base, section, detail; projected orientations: projected:above/below/left/right with parent_id. Suggestions are previewed until accepted. PDF can include all sheets.

ArgumentTypeDescription
action requiredstringOperation
sheet_idstringSheet identity; defaults to first sheet
view_idstringView identity
parent_idstringParent view identity
orientationstringfront/top/right/back/left/bottom/iso or projected:above/below/left/right
kindstringbase/section/detail
sourcesarraySource body names or IDs; required for a base view
xnumberPaper X or move delta in mm
ynumberPaper Y or move delta in mm
scalenumberPositive view scale
verticalbooleanVertical section cutting line
cutnumberSection coordinate in model mm
radiusnumberDetail radius in model mm
rationumberDetail magnification
categorystringOverall size / Diameters / Center marks / Hole positions
suggestionsarraySuggestion IDs from the most recent preview
annotation_idstringAnnotation identity
settingsobjectSheet settings: name/title/number/material/notes/units/format/scale/generalTolerance
pathstringExport file path .pdf/.svg/.dxf
allbooleanExport all sheets to PDF

guide ​

Read a built-in how-to for doing a kind of work well. With no topic it lists them. Read 'freeform' before building any curved or organic shape: it covers describing a shape by stations and silhouettes, measuring it with solid_profile and screenshot views, and the usual failure modes.

ArgumentTypeDescription
topicstringGuide name, for example freeform. Omit to list the guides.

pick_at ​

What a viewport click at this world point would pick through the given filter (or the active slot's filter): item, kind, index and a readable name. Diagnostic for pick wiring.

ArgumentTypeDescription
at requiredarrayWorld point [x,y,z] to project and pick.
filterstringOptional filter like 'Edge' or 'SketchObj|CurveObj|Face|Edge' (default: the active filter).

render_setup ​

The picture-wide render choices stored on the document. action: state (current setup) | set (env, background, exposure, fit, offsets) | set_background (import a PNG/JPEG file as the backdrop image; produces it first with run_script if asked to generate one).

ArgumentTypeDescription
action requiredstringstate | set | set_background
envstringstudio | sky | dark_studio | lights_only | hdr
backgroundstringenvironment | white | transparent | green | black | gradient | image
exposurenumber0.1-10.
fitstringfill | fit | stretch (background image only).
offset_xnumber-1..1
offset_ynumber-1..1
pathstringFull path of the image file for set_background (≤16 MB; the generated folder Prism/generated is the right place for AI-made backdrops).

script_editor ​

The built-in script editor (one Python file). action: open | state | get | set (replace ALL of the script; keeps a rollback point) | insert (text before 'line', default: at the end) | rollback (restore the previous version; repeat to step back) | run | save.

ArgumentTypeDescription
action requiredstringopen | state | get | set | insert | rollback | run | save
textstringSource code for set/insert.
lineintegerInsert before this 1-based line; default appends.
pathstringSave path for save.

select_tab ​

Switch the ribbon to a workspace tab by its title (for example Static, CAM, Solid). The document remembers it and reopens on that tab.

ArgumentTypeDescription
title requiredstringTab title, matched case-insensitively.
commandstringOptional command name (for example cam_playback or drive_joints) to leave open when the file is opened, so the user only presses its Play or Run button. Omit to clear.

settings ​

Application and assistant settings. action: list | get | set | reset | open (open the Settings window at 'page'). 'key' comes from list, 'value' for set. API keys and the automation token are never exposed.

ArgumentTypeDescription
action requiredstringlist | get | set | reset | open
keystringSetting key from list.
valueanyNew value.
pagestringSettings page for open: appearance | interaction | workspace | toolbars | ribbon | assistant | keyboard

solid_profile ​

Look at a shape in numbers and text, for judging proportions without a picture. Works on a Freeform, solid, surface or mesh (or a list of them, measured together). sections: cross-sections perpendicular to axis (x|y|z, default z) at count evenly spaced offsets (default 10) or at the offsets in at: for each cut the two extents (min/max), the section area, the centroid and how many separate outlines it has; an empty cut means the shape does not reach that offset. silhouettes: ASCII pictures (front: x right z up; right: y right z up; top: x right y up) at the stated mm per column; shade:true adds a depth ramp (@ nearest to . farthest). Use it to check that a neck is narrower than a shoulder, a handle really is a loop, or a part is lopsided.

ArgumentTypeDescription
object requiredanyObject name, or a list of names.
axisstringSection axis: x | y | z (default z).
countintegerEvenly spaced sections (default 10; 0 = none).
atarraySection offsets along the axis in mm (instead of count).
viewsarraySilhouettes to draw: front, right, top (default all three; [] = none).
widthintegerSilhouette width in characters (default 48).
rowsintegerMost rows a silhouette may use (default 26); a tall shape gets a coarser grid instead.
shadebooleanSilhouette uses a depth ramp instead of #.