OpenBim.Ifc
0.1.1
dotnet add package OpenBim.Ifc --version 0.1.1
NuGet\Install-Package OpenBim.Ifc -Version 0.1.1
<PackageReference Include="OpenBim.Ifc" Version="0.1.1" />
<PackageVersion Include="OpenBim.Ifc" Version="0.1.1" />
<PackageReference Include="OpenBim.Ifc" />
paket add OpenBim.Ifc --version 0.1.1
#r "nuget: OpenBim.Ifc, 0.1.1"
#:package OpenBim.Ifc@0.1.1
#addin nuget:?package=OpenBim.Ifc&version=0.1.1
#tool nuget:?package=OpenBim.Ifc&version=0.1.1
OpenBim.Ifc (.NET)
Read, edit, validate and write IFC files from .NET: C#, F#, or a Revit,
Navisworks, Tekla or Dynamo add-in. A thin binding over the
openbim-ifc Rust crates, through
their versioned C ABI; the native library ships inside the package.
dotnet add package OpenBim.Ifc
Documentation: .NET guide · source and issues
using OpenBim.Ifc;
using var model = IfcModel.Open("model.ifc");
foreach (var wall in model.IdsOfTypeIncludingSubtypes("IfcWall"))
{
Console.WriteLine($"#{wall} {model.Attribute(wall, 2)}"); // 'Wall'
model.SetAttribute(wall, 2, new Value.Text("Renamed"));
}
File.WriteAllBytes("out.ifc", model.Write());
Platforms
| Target framework | Hosts |
|---|---|
net8.0 |
.NET 8 and later |
netstandard2.0 |
.NET Framework 4.6.2 and later (Revit 2024 and older), Mono, older .NET |
The package carries the native library for win-x64, win-arm64,
linux-x64, linux-arm64, osx-x64 and osx-arm64, all 64-bit. A .NET
application picks its runtime's copy itself. A .NET Framework project gets
the Windows libraries copied into its output by the package's build
targets, and the assembly loads them from next to itself, so an add-in
needs no RuntimeIdentifier and no copy step.
Values
Attribute values are a closed record hierarchy, one case per STEP form:
Value.Null ($), Value.Derived (*), Value.Bool, Value.Unknown
(.U.), Value.Integer (64-bit), Value.Real, Value.Text,
Value.Binary, Value.Enum, Value.Ref (#42), Value.List and
Value.Typed (IFCLENGTHMEASURE(2.5)). They keep every distinction IFC
makes, so a file read and written back through .NET is unchanged; they
compare by value, lists included.
Errors
Every refusal throws IfcException with a stable Code (parse,
missing-entity, invalid-value, unsupported-schema, ...) shared with
the JavaScript, Python and C bindings, and the C ABI's Status. A refused
edit leaves the model unchanged.
Models and threads
IfcModel is IDisposable: dispose it to release the native model, or
the finalizer will. Calls on one model are serialised by the library, so a
model may be shared between threads; calls on different models run in
parallel.
Scope
The record model -- entities, attributes by position and by name, the
STEP codec, exact and subtype queries -- plus lenient reads (ParseOptions), the STEP header,
validation, ifcXML, the reachability lint, the read-only domain views
(property sets and quantities, the spatial tree, classification,
materials, systems, cost, georeferencing) as C# records, writing
property sets and quantities as one checked transaction
(SetProperties), checked against the embedded PSD/QTO catalog, and
creating entities as one checked transaction (Author with AuthorOps:
entities by type and named attributes, the spatial structure, placed,
contained and typed products, removal with relationships). Geometry is
not bound yet.
Build from source
The package is C# in dotnet/; the Cargo crate around it holds its
version, changelog and the tests that hold the C# declarations to the C
header and the shared records. With the .NET 8 SDK and Rust:
python3 crates/openbim-ifc-dotnet/scripts/check-dotnet.py
builds the C ABI library for this machine, packs the .nupkg and runs the
C# suite against it from a fresh project.
License
AGPL-3.0-or-later; the package carries LICENSE and NOTICE. See the
repository's LICENSING.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.