Skip to main content
Version: v4.5

Properties

In your objects.json file, define the properties that the your type and object properties reference. For more information on defining a property, see the following properties object schema with reference to Table 1:


{  "properties" : [    {      "id" : "integer",      "name" : "string",      "dname" : "string",      "type" : {        "enum" : ["STRING",          "BOOLEAN",          "INTEGER",          "LONG",          "DOUBLE",          "FLOAT",          "DATE"]      },      "uom" : "string",      "edit" : "boolean",      "psName" : "string",      "psDispName" : "string"    },    ...  ],  ...}    

Table 1: Properties object schema

PropertyTypeDescription
"id"StringAn integer id for the property definition.
"name"StringThe property's name, which can be an internal property name.
dnameStringThe property's display name in the user interface.
"type"StringThe property value's permitted data types, which can be one of the following strings: "STRING", "BOOLEAN","INTEGER", "LONG", "DOUBLE", "FLOAT", "DATE"
"type.enum"Array of StringPass an array that contains one or more of the following strings: "BOOLEAN", "INTEGER", "LONG", "DOUBLE", "FLOAT", "DATE".
"uom"StringUnit of measure
"edit"BooleanDescribes if a property's value is editable. If set to true, platform applications can change the value. Later, the changed value can sync back to the source model if you implement the sync-back feature.
"psName"StringThe property-set name if the property belongs to a property set
"psDispName"StringThe property-set's display name in the user interface

Sample property object#

{  "id": "20",  "name": "LEVEL_ROOM_COMPUTATION_HEIGHT",  "dName": "Computation Height",  "type": "DOUBLE",  "uom": "mm",  "edit": false,  "psName": "PG_GEOMETRY",  "psDispName": "Dimensions"}

Special CAD application specific properties#

For properties specific to your CAD application that the platform can use for special functions like mapping model elements to platform types, such as the Revit Category property, use the following schema:

{  "id": "integer-string",  "name": "string", //Enter the special property name in capital letters and replace spaces with underscores  "dName": "string", //Enter a name to display in the UI  "type": "string" | ["string"], //The special property's value  "edit": true | false,}

Table 2: CAD application specific properties schema

PropertyValueExample
"id"An integer id for the property definition, like a normal property definition"21"
"name"Enter the special property name in capital letters and replace spaces with underscores"REVIT_CATEGORY"
"dName"Enter a name to display in the UI"Revit Category"
"type"The special property's valuen"STRING"
"edit"Describes if a property's value is editable. If set to true, platform applications can change the value. Later, the changed value can sync back to the source model if you implement the sync-back feature.false

Revit Category property example#

The following example defines the Revit Category property:

{  "id": 20,  "name": "REVIT_CATEGORY",   "dName": "Revit Category",   "type": "STRING",   "edit": false,}