openbim-ifc-dotnet
The OpenBim.Ifc NuGet package: .NET bindings for openbim-ifc over its versioned C ABI.
| Status | Implemented |
| Latest release | 0.1.1 (2026-10-04) |
| Registries | NuGet OpenBim.Ifc |
| API documentation | rustdoc |
| Source | crates/openbim-ifc-dotnet/ |
Overview
The OpenBim.Ifc NuGet package: .NET bindings for openbim-ifc (#327).
The binding is C#, in dotnet/OpenBim.Ifc/: P/Invoke over the versioned C ABI of openbim-ifc-capi (openbim_ifc_v0_1_*), whose shared library the package ships per runtime identifier under runtimes/<rid>/native/. It adds calling-convention glue only (ADR 0013): every refusal and every error code comes from the same Rust core the other bindings use.
This crate holds no Rust binding code. It exists so the package has what every other binding has -- a version in a manifest the release tooling reads, a changelog, a openbim-ifc-dotnet-v* release tag and a reference page -- and so its tests can hold the C# source to the two contracts it depends on without a .NET SDK:
- every
openbim_ifc_v0_1_*function and status code of the C header is declared inNative/NativeMethods.cswith the header's parameter types, and every struct with its fields in order; - every domain record of the shared binding core has a C# record with the same fields in the same order, since a record crosses the C ABI as a
LISTof its field values with no names.
The behaviour is tested from C# against the packed .nupkg by scripts/check-dotnet.py.
Changes
Latest release, 0.1.1 (2026-10-04):
Added (#330, schema-checked entity creation)
IfcModel.Author(ops):AuthorOps built withAuthorOp.Create,Edit,Remove,Project,Spatial,Product,TypeObject,AssignType,Contain,Aggregate,PlacementandOwnerHistory, applied as one checked transaction; returns per operation the id it produced (null for a removal).IfcModel.Handle(index)/HandleBasename the entity an earlier operation produced.CreateEntity(type, attributes)andRemoveWithRelationships(id)are one-operation batches.IfcStatus.MissingAttribute(30) andStillReferenced(31). Needs the C ABI 0.1.6. Additive: a patch release.
Full history: crates/openbim-ifc-dotnet/CHANGELOG.md