Features/MCP Workflows/Onshape/Mass budget from an Onshape Part Studio

Mass budget from an Onshape Part Studio

This reads a Part Studio, not an assembly tree. The report says so before it says anything else, because a partial total that looks complete is worse than no total.

OnshapeWrites · gated

The problem this solves

Mass data lives in CAD and the budget lives in the model, and the gap gets closed by someone reading numbers off a screen once a quarter. Automating it is only an improvement if the automation is honest about what it could not see, and about which masses had no material behind them.

How it works

Part properties by FeatureScript evaluation, with the Part Studio scope stated before any total. The connector reaches a Part Studio, not an assembly tree, so coverage is usually partial and the report leads with that rather than presenting a partial total as a complete one.

01
State the scope limit first
The connector evaluates FeatureScript against the configured document's Part Studio. Not an assembly tree, not other documents. If what you need is an assembly rollup, it says the connector cannot do it today.
02
Read the API surface before querying
The stored FeatureScript notes and the documentation search come first, since the available constructs matter more here than in any other workflow in the library.
03
Exclude what has no material
A mass computed with no material assigned, or a default density, is not evidence. Those parts are reported separately and kept out of the headline total.
04
Roll up with coverage leading
Children summing to parents, margin against the allocation and its requirement ID, and coverage stated next to every total. Given the Part Studio scope, coverage is often partial, and the report leads with that.

About this connector

The Onshape connector is pointed at a configured document and Part Studio.

The Onshape connector is a FeatureScript environment. It reads and writes Feature Studios and evaluates FeatureScript against a Part Studio in a configured document. Geometry and mass data are reachable by evaluating FeatureScript, but this is not an assembly or BOM connector, and these workflows are scoped to a Part Studio in the configured document rather than to a full assembly tree. If you need assembly-level rollups today, this connector cannot do it.

The prompt

You are reading part properties from an Onshape Part Studio by
evaluating FeatureScript, and using them to update the mass budget
in the Dalus model [model name].

READ THE CONNECTION'S LIMITS INTO THE CONVERSATION FIRST. This
connector evaluates FeatureScript against the configured document's
Part Studio. It is not an assembly BOM interface. Tell the user
plainly what is in scope: the parts in the Part Studio you can
reach, not a full assembly tree, and not other documents. If what
they need is an assembly rollup, say the connector cannot do it
today rather than producing a partial total that looks complete.

CHECK THE CONNECTION FIRST: confirm the configured document and Part
Studio, report what you can see, and confirm the Dalus model is
reachable. Before writing any FeatureScript, read the existing
FeatureScript notes and the documentation search, since the API
surface matters more here than in any other workflow in this
library.

CONFIRM FIRST, in one message: which Dalus model and branch; which
Part Studio; which properties to collect (mass, volume, material,
bounding box); how parts map to model parts; and whether a previous
run exists to compare against. Ask anything else in the same
message. Then begin.

TREAT THE DOCUMENT AS READ-ONLY. Evaluate FeatureScript to query;
never write a Feature Studio, never create geometry, never modify
the user's parts. Use the test evaluation path rather than anything
that persists.

EVALUATE AND EXTRACT: query the parts in the Part Studio and return
per part its name, part number or attribute where set, mass, volume,
material and density. Print structured output that you can parse
reliably rather than prose. If an evaluation errors, report the
error verbatim and do not substitute an estimate.

MATERIAL HONESTY: a mass computed with no material assigned, or with
a default density, is not evidence. Report those parts separately
and exclude them from the headline total rather than absorbing them
into it.

MATCH PARTS TO MODEL PARTS and show the matching basis per item,
marking inferred matches, with unmatched items in their own lists on
both sides.

ROLL UP through the model hierarchy with the arithmetic visible,
children summing to parents. State coverage next to every total:
what share came from parts with real materials, what share is
unassigned, and what share of the model has no Onshape source at
all. Given the Part Studio scope, coverage will often be partial,
and the report must lead with that rather than bury it.

REPORT THE MARGIN against the allocation with its requirement ID, in
absolute terms and as a percentage, and the delta against a previous
run where one exists.

OFFER, DO NOT EXECUTE: writing the masses onto model parts as
attributes, gated per part, with their material provenance; and
re-running before the next review.

THIS WORKFLOW IS READ-ONLY on the Onshape document and on the Dalus
model unless the user approves the write-back per part.

Replace the [bracketed] placeholders with your model and project names.

What you get

A scope statement before any number, naming what the connector could not reach
Parts with no material or a default density, excluded and listed
Margin against the allocation with its requirement ID, and coverage per total
Matching basis shown per part, with unmatched lists on both sides
Dalus + Onshape

Evaluates FeatureScript to query parts, using the test evaluation path rather than anything that persists: it never writes a Feature Studio, creates geometry, or modifies your parts. An evaluation error is reported verbatim rather than filled with an estimate.

Nothing is written until you approve it. The prompt carries the gate: the agent shows the full change set and waits, whether the target is the model or a system it reaches through a connector.

Common questions

Can it roll up a whole assembly?
No. The connector evaluates FeatureScript against a Part Studio in the configured document, and the workflow says that at the top of every report. If you need an assembly-level rollup, it tells you the connector cannot do it today rather than producing a partial total that reads as complete.
What about parts with no material?
Their mass is not evidence, so they are reported separately and excluded from the headline total rather than absorbed into it. A density that is really just the default is treated the same way.
Does it write to our Onshape document?
No. It uses the test evaluation path only. Writing masses back onto Dalus model parts is offered afterwards, gated per part, and carries the material provenance with it.