Skip to main content
Version: v4.6

Types

In your objects.json file, define the object types from your CAD model, such as pipe or wall types. The model objects are instances of types. For more information on defining a type, see the following type object schema with reference to Table 1:

{  ...  "types": [    {      "id": "string-integer",      "sourceId": "guid" | "integer" | "string",      "name": "string",      "properties": [        {          "id": "integer",          "name": "string",          "val": "various data types", //consistent with data type in property definition          "dVal": "string", //optional, display text value for UI function use        }      ]    }  ],  ...}

Table 1: Type object schema

PropertyTypeDescription
"id"StringGive the type an id that is unique in the Bimpk.
"name"StringThe type's name, such as "Furniture_Desk::1525x762mm".
"sourceId"GUID/Number/StringThe type's source id in the CAD application.
"properties"Array of ObjectPass an array of property reference objects for each of the type's properties.
"properties.id"NumberCopy the property definition's id you want to reference.
"properties.name"StringCopy the property definition's "name" value you want to reference exactly as it appears.
"properties.val"ManyThe property's value. The value must adhere to a data type set in the property definition's "type" value.
"properties.dVal"StringThe property's display value you want the user to see.

Type definition data example#

{  "types": [    {      "name": "Furniture_Desk::1525x762mm",      "sourceId": "cf6a029b-219b-40d4-a2f0-b71be410e452-00003768",      "properties": [        {          "id": 11,          "name": "REVIT_CLASS",          "val": "Autodesk.Revit.DB.FamilyInstance"        },        {          "id": 12,          "name": "REVIT_CATEGORY",          "val": "OST_Furniture",          "dVal": "Furniture"        },        {          "id": 13,          "name": "REVIT_FAMILY",          "val": "Furniture_Desk"        },        {          "id": 14,          "name": "REVIT_TYPE",          "val": "1525x762mm"        },        {          "id": 229,          "name": "FAMILY_FREEINST_DEFAULT_ELEVATION",          "val": 0.0        },        ...      ],      "id": 228    },    ...  ]
}