Skip to content

Material data

this query gets the materialData from the FamilyInstances. This query is meant to be used for the dashboard. The shared parameter is used to organise the data. Example: How much volume per specific shared parameter value.

```jsonata ( $getSym := function($id){ $$[type = "FamilySymbol" and id = $id]};

$getMaterialName := function($materialDataId){
    $$[type= "Material" and id = $materialDataId].name
};

$[type = "FamilyInstance"].values.materialData.{
    "id":id,
    "type":%.%.type,
    "name":%.%.name,
    "OTL":$getSym(%.%.parent.id).values."p_104c3657-6918-4b2b-a0b9-bf4b05c8621a".value,
    "totalArea":totalArea,
    "totalVolume":totalVolume,
    "materialName":$getMaterialName(id),
}

) ````