Request

Response

    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 model.

    As a prerequisite for completing the current topic, you need to complete the following tasks:

    1. Retrieve Hubs.
    2. Retrieve Projects.
    3. Retrieve Folders.
    4. Retrieve Items.

    You will use the following operation in this topic:

    TypeOperationDescription
    Query model Retrieves physical properties of a model.

    Retrieve Physical Properties of a Model

    The model query returns PhysicalProperties representing the details of physical properties mapped to a model.

    1. In Manufacturing Data Model Explorer, enter the following query in the Query Pane:

      Query

      query GetPhysicalProperties($modelId: ID!) {
         model(modelId: $modelId) {
            id
            name{
               value
            }
            materialName{
               value
            }
            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
    2. In the Query Variables Pane, enter the value of the modelId. To know how to obtain the modelId (tipRootModel), refer to Retrieve Items.

      Query Variables

      {
         "modelId": "bW9kZWx-d00wSVJmdmczT1VLTHZsYjJ4dDJMdF9MMkN-Y3hTMXhkYkFmSjFZZWZUSldUQU9zUV9hZ2E"
      }
      
    3. Click Play. The physicalProperties appear in the response section along with the information about area, mass, volume, density, and bounding box of a model.

      Response

      {
         "data": {
            "model": {
               "id": "bW9kZWx-d00wSVJmdmczT1VLTHZsYjJ4dDJMdF9MMkN-Y3hTMXhkYkFmSjFZZWZUSldUQU9zUV9hZ2E",
               "name": {
                  "value": "A"
               },
               "materialName": {
                  "value": "Steel"
               },
               "physicalProperties": {
                  "status": "COMPLETED",
                  "mass": {
                     "displayValue": "0.3308687611445",
                     "value": 0.3308687611445,
                     "definition": {
                        "name": "Mass",
                        "specification": "MASS",
                        "units": {
                           "id": "kilograms",
                           "name": "Kilograms"
                        }
                     }
                  },
                  "volume": {
                     "displayValue": "42.14888677",
                     "value": 42.14888677,
                     "definition": {
                        "name": "Volume",
                        "specification": "VOLUME",
                        "units": {
                           "id": "cubicCentimeters",
                           "name": "Cubic centimeters"
                        }
                     }
                  },
                  "area": {
                     "displayValue": "119.43137354",
                     "value": 119.43137354,
                     "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": "4.135930146722492",
                        "value": 4.135930146722492
                     },
                     "width": {
                        "displayValue": "9.69497969697018",
                        "value": 9.69497969697018
                     },
                     "height": {
                        "displayValue": "6.4258",
                        "value": 6.4258
                     }
                  }
               }
            }
         }
      }
      
      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.