Creating a custom data type
Add a new item in the "TypeDefinitions" folder under "Schema".
![Creating a custom data type 1:](Images/png/5258796171__Web.png)
Add a new JSON file or JSON schema file to the project.
![Creating a custom data type 2:](Images/png/5258797835__Web.png)
Reference the schema file in Description.json under "dataTypes". Note that user-specific data types are assigned to the "Framework" category.
"dataTypes": [
{
"name": "tchmi:framework#/definitions/CustomDatatype",
"schema": "Schema/TypeDefinitions/CustomDatatype.Schema.json"
}
]
You can then use the user-specific data type within Description.json.
"type": "tchmi:framework#/definitions/CustomDatatype
![]() | If the framework control is already referenced in an HMI project, a project build (see First Steps) must then be executed and the HMI project reloaded so that the new data type is included in the type descriptions of the HMI project. |
To reload the project, right-click on the HMI project and select "Unload project".
![Creating a custom data type 4:](Images/png/4938019595__Web.png)
Then select "Reload project" to reload the project. You can then use all the functions as usual.
![Creating a custom data type 5:](Images/png/4938430859__Web.png)