0

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

Any idea of how to do that?

enter image description here

1 Answer 1

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;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.