GeometryGym / GeometryGymIFC

C# classes to generate and parse OpenBIM IFC files
Other
269 stars 97 forks source link

IFC4x3: IfcBuiltElement is not instantiable #35

Closed seb-esser closed 3 years ago

seb-esser commented 3 years ago

Due to IFC4x3: IfcBuiltElement IfcBuiltElement should be instantiable.

I was trying var myProduct = new IfcBuiltElement(database);, which seems valid looking on the constructor declarations. However, Visual Studio is telling me that I cannot instantiate this class due to the protection level. Nevertheless, IfcBuildingElementProxy is still available when drafting an IFC4x3_RC1 based model. Likely IfcBuildingElementProxy misses the deprecated flag.

Thanks - let me know if I can support anything else than just reporting issues I am spotting during my testing sessions

jmirtsch commented 3 years ago

Hi Sebastian,

Thanks for reporting, I just pushed to the work in progress branch with public constructors for the class as it's no longer abstract.

The toolkit as you know supports multiple versions, so I haven't necessarily removed constructors for deprecated (or deleted) concepts, but I have usually put an Obsolete attribute on the class (or attribute) to at least provide some feedback to code calling it.

seb-esser commented 3 years ago

Yep, thanks! The obsolete attribute is perfect and makes cross-versioning quite convenient