70002198 Read IFC object type properties

Article 70002198
Type Wish
Product vdIFC
Version 9003
Date Added 4/19/2022 12:00:00 AM
Fixed 10.1001.0.2 (4/19/2022 12:00:00 AM)
Submitted by George

Summary

Read IFC object type properties like OverAllWidth and OverAllHeght of IfcDoor and IfcWindow

Solution

In version 1001.0.2 all Ifc object type properties that are primitive types are saved to
vdIFCProduct.PropertiesGroup("IFC_TYPE_PROPS") collection
The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, IntPtr, UIntPtr, Char, Double, and Single.
NOTE: these properties are also exported to IFC object object types when saving as IFC format

Example

//get the OverAllWidth property usually from a vdIFCProduct object with IFCType = IFCDOOR or IFC WIDNOW
vdIFCProduct obj;
vdIFCProperties ifcprops = obj.PropertiesGroup.FindName("IFC_TYPE_PROPS");
if(ifcprops == null) return;
object value = ifcprops.Properties["OverAllWidth"];
if(!(value is double)) return;
return (double)value;

Send comments on this topic.