我正在尝试使用Xbim获取IfcSpace的FinishFloorHeight。
你知道怎么做吗?

发布于 2021-05-19 21:12:33
如果您查看xbim docs上的示例,您将看到如何获取空间的数据。要获得链接中定义的完工楼层高度,可以使用以下代码:
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;
}https://stackoverflow.com/questions/67601670
复制相似问题