简体   繁体   English

使用不同 Ifc 版本的相同代码的不同结果

[英]Different results for the same code with different Ifc versions

When I run the code below to get ifcWindow Area quantity using Ifc4 file and Xbim.Ifc4 interfaces it works perfectly.当我运行下面的代码以使用 Ifc4 文件和 Xbim.Ifc4 接口获取 ifcWindow Area 数量时,它可以完美运行。

代码

But, When I'm trying to run on the same schema as Ifc2x3 file and using Xbim.Ifc2x3 interfaces it doesn't recognize RelatingPropertyDefinition property and performs the following error: error但是,当我尝试在与 Ifc2x3 文件相同的架构上运行并使用 Xbim.Ifc2x3 接口时,它无法识别 RelatingPropertyDefinition 属性并执行以下错误:错误

Thanks谢谢

IFC 2x3 schema implementation in xbim Toolkit implements IFC4 interfaces to keep the code backwards compatible and to be able to write one code base for both schemas. xbim Toolkit 中的 IFC 2x3 模式实现实现了 IFC4 接口,以保持代码向后兼容并能够为两种模式编写一个代码库。 But IFC4 doesn't implement IFC2x3 interfaces.但是 IFC4 没有实现 IFC2x3 接口。 RelatingPropertyDefinition is new in IFC4, so you would have to restructure the code. RelatingPropertyDefinition是 IFC4 中的新功能,因此您必须重新构建代码。 But bare i mind, that if you use IFC2x3 interfaces, it will only work for IFC2x3 files.但我不介意,如果你使用 IFC2x3 接口,它只适用于 IFC2x3 文件。 If you use IFC4 interfaces, it will work for both schema versions.如果您使用 IFC4 接口,它将适用于两种模式版本。 In fact, we plan that in the future there will always only be one set of interfaces to avoid confusion.事实上,我们计划将来总是只有一组接口以避免混淆。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM