Skip to main content

Export IFC Custom Properties

When using export-ifc you can add a second file that contains custom properties to add to the elements of the resulting file.

This file must be a .zip file that contains only a .json file. The JSON Schema of the file is at the end of this document.

To connect the custom properties with the elements of the file use the element's GlobalId property.

For example if, in the source file, there is an element with Global Id '1mNoyQNRjFqALu0EZLqVjE', we can add to it a Property Group called 'CustomProps', containing a Property called 'CustomPropery' with the following file.

Example
{
"properties": [{
"globalId": "1mNoyQNRjFqALu0EZLqVjE",
"groups": [{
"name": "CustomProps",
"properties": [{
"type": "TEXT",
"name": "CustomPropery",
"value": "Custom Value"
}]
}]
}]
}
Custom Properties Schema
{
"$schema" : "https://json-schema.org/draft/2019-09/schema",
"type" : "object",
"properties" : {
"properties" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"globalId" : {
"type" : "string"
},
"groups" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"properties" : {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"value" : {
"type" : "string"
},
"type" : {
"const" : "TEXT"
}
},
"required" : [ "type" ]
}, {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"value" : {
"type" : "number"
},
"type" : {
"const" : "DECIMAL"
}
},
"required" : [ "type" ]
}, {
"type" : "object",
"properties" : {
"currency" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"value" : {
"type" : "number"
},
"type" : {
"const" : "MONETARY"
}
},
"required" : [ "type" ]
}, {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"unit" : {
"type" : "string",
"enum" : [ "MM", "M2", "M3", "KG" ]
},
"value" : {
"type" : "number"
},
"type" : {
"const" : "WITHUNIT"
}
},
"required" : [ "type" ]
} ]
}
}
}
}
}
}
}
}
}
}