I have used the following params and headers settings in the request.
params = {
'ClassUri': ifc_class_uri,
}
headers = {
'Accept': 'application/json',
}
where ifc_class_uri is a parameter that holds class uri.
As you noted there are no classProperties returned in the list and totalCount is 0. I found that this happens when there are no properties under propertySet = “Attributes”.
For e.g.:
-
For IfcDistributionSystem, there are 5 properties under the propertySet Attributes. These are: Description,Global ID,Long Name,Name,Object Type. Therefore, we get a non-empty list and totalCount = 5 for the 5 properties returned.
<Image 1: Unable to upload in a comment here>
ifcDistributionSystem - Get Class Properties Results
-
For IfcAlignmentHorizontalSegment, there are no properties under propertySet Attributes. This seems to be the reason we get an empty list and totalCount=0.
<Image 2: Unable to upload in a comment here>
ifcAlignmentHorizontalSegment - Get Class Properties Results
But if check ifc43 docs for these classes, we see that there are 7 properties assigned to ifcAlignmentHorizontalSegment — StartPoint, StartDirection,.. Not sure why the API call is not returning these?
<Image 3: Unable to upload in a comment here>
Upon investigating the difference between the above classes is ifcAlignmentHorizontalSegment has no PropertySets mapped to it, and ifcDistributionSystem has several property sets mapped to it in the docs. So, I checked if the API is returning classProperties only when a property set is mapped to a class. I found that for all nearly 99% of the classes that have atleast one property set associated with them, API returns a non-empty classProperties list. But when no property sets are associated with a class in IFC Docs, the API does not return any “classProperties” (PS: I found that there are over 50 such classes)
CONCLUSION (so far… ): There seems to be a pattern to what Properties API returns for a class, but cannot explain this behavior. Need a more full proof way to ensure that the Properties API returns whats in the IFC Docs. It seems that the Get Class Properties API does not return return any properties for classes where there is no property set mapped to the class (as per the ifcdocs). Its wierd, but that seems to be the case. Furthermore, the properties returned include inherited properties from parent classes, but the returned list is inconsistent with the ifcDocs. For e.g., in case of ifcDistributionSystem, as shown in the table below, OwnerHistory and PredefinedType are not returned by the Properties API. May be Predefined Type is an Enum, so thats why? (as API does not return any class relationships (Sets, Enumerations)).
Class |
Properties (ifcDocs) |
Properties (API Returns) |
Parent: ifcRoot |
GlobalID, OwnerHistory, Name, Description |
GlobalId, Name, Description |
Parent: IfcObject |
ObjectType |
ObjectType |
Self: ifcDistributionSystem |
LongName, PredefinedType |
LongName |
NOTE: The get Properties API also returns Property Sets, but I found that all the property sets are not returned. For example, for ifcDistributionSystem, following PropertySets are mapped to the class in IFC DOCS, but the Properties API does not return PropertySets like Pset_DistributionSystemCommon, Pset_DistributionSystemTypeElectrical…
<Image 4: Unable to upload in a comment here>
IfcDocs - IFCDistributionSystem PropertySets
vs. Property Sets returned by Get Property Sets for Class (see above)