Retrieve Physical Properties
This topic will help you retrieve the physical properties such as area, mass, volume, density, surface area, and bounding box of an autodesk Fusion component.
As a prerequisite for completing the current topic, you need to complete the following tasks:
You will use the following query in this topic:
Type | Operation | Description |
---|---|---|
Query | componentVersion | Retrieves an object representing a version of a component. |
Step 1 - Retrieve Physical Properties of a component
The componentVersion query returns PhysicalProperties representing the details of physical properties mapped to a component.
- In Manufacturing Data Model Explorer, enter the following query in the Query Pane:
Query
query GetPhysicalProperties($componentVersionId: ID!) { componentVersion(componentVersionId: $componentVersionId) { id name partNumber isMilestone materialName lastModifiedOn physicalProperties { status mass { displayValue value definition { name specification units { id name } } } volume { displayValue value definition { name specification units { id name } } } area { displayValue value definition { name units { name } } } density { displayValue value definition { name units { name } } } boundingBox { length { displayValue value } width { displayValue value } height { displayValue value } } } } }
Show More - In the Query Variables Pane, enter the value of the
componentVersionId
. To know how to obtain thecomponentVersionId
(tipRootComponentVersion), refer to Retrieve Items.Query Variables
{ "componentVersionId": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35WVGxxN01wd3I5a3lnVFV1eFlUbkZoX2FnYX5SeXlYZHlmbWFhd1dOV3ZrSFhzcUdL" }
- Click Play. The
physicalProperties
appear in the response section along with the information aboutarea
,mass
,volume
,density
, andbounding box
of a component.Response
{ "data": { "componentVersion": { "id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35WVGxxN01wd3I5a3lnVFV1eFlUbkZoX2FnYX5SeXlYZHlmbWFhd1dOV3ZrSFhzcUdL", "name": "Gas Pedal", "partNumber": "Gas Pedal", "isMilestone": false, "materialName": "Steel", "lastModifiedOn": "2024-02-08T10:52:41.000Z", "physicalProperties": { "status": "COMPLETED", "mass": { "displayValue": "1.537328313794392", "value": 1.537328313794392, "definition": { "name": "mass", "specification": "MASS", "units": { "id": "kilograms", "name": "Kilograms" } } }, "volume": { "displayValue": "195.8380017572474", "value": 195.8380017572474, "definition": { "name": "volume", "specification": "VOLUME", "units": { "id": "cubicCentimeters", "name": "Cubic centimeters" } } }, "area": { "displayValue": "859.986463604413", "value": 859.986463604413, "definition": { "name": "area", "units": { "name": "Square centimeters" } } }, "density": { "displayValue": "0.00785", "value": 0.00785, "definition": { "name": "density", "units": { "name": "Kilograms per Cubic Centimeter" } } }, "boundingBox": { "length": { "displayValue": "24.3334639034822", "value": 24.3334639034822 }, "width": { "displayValue": "14", "value": 14 }, "height": { "displayValue": "8.4", "value": 8.4 } } } } } }
Show More
Note: The status mentioned in the response is the result of successful execution of the request. If the request is not successful or complete, we recommend that you retry executing the query to get a successful response. For more information about other statuses, see PhysicalPropertyStatusEnum.