0

I'm trying to get the FinishFloorHeight of IfcSpace using Xbim.

Any idea of how to do that?

enter image description here

Luca Ghersi
  • 3,261
  • 18
  • 32
Yula k
  • 5
  • 1

1 Answers1

0

If you look at the examples at xbim docs, you will see how to get data for a space. To get finish floor height as defined in your link, you can use this code:

private static double? GetFinishFloorHeight(IIfcSpace space)
{
    return space.IsDefinedBy
        .SelectMany(r => r.RelatingPropertyDefinition.PropertySetDefinitions)
        .OfType<IIfcElementQuantity>()
        .Where(qs => qs.Name == "Qto_SpaceBaseQuantities")
        .SelectMany(qset => qset.Quantities)
        .OfType<IIfcQuantityLength>()
        .Where(q => q.Name == "FinishFloorHeight")
        .FirstOrDefault()?.LengthValue;
}
Martin Cerny
  • 344
  • 3
  • 9