NwcIO is a fast, 100% managed .NET library and command line tool that reads Autodesk Navisworks cache and document files (.nwc, .nwd, .nwf) directly from disk without Navisworks or the Navisworks API, writes .nwc files, exports parsed data such as the scene tree and properties to JSON, and converts models into IOScene scene documents through the NwcIO.Scene adapter. Its export, coordination, and viewer extras (IFC, glTF, OBJ, clash, HTML viewer) are frozen: bug fixes only.
Built clean-room under the IOExtend organization alongside RvtIO and IfcIO.
- Reads scene hierarchy, geometry meshes, transforms, GUID tables, and property categories. Materials are decoded from the file on the strict path (name, colour, alpha) and for files not read through their DbCache directory only the names from property records are read: a colour comes from a
revit_Colorrecord, and a material without one (or a mesh without any) gets a neutral colour markedIsInferred. Element nodes of model files carry the element's export GUID and IFC GlobalId. - Writes
.nwcfiles from code (NwcWriter,NwcDocumentBuilder). - Exports structured JSON (
NwcDocument.SaveJson,nwcio model.nwc model.json) with the file information, property records, GUIDs, transforms, scene tree (each node with its id, name, class, value, element GUID, transform, properties, and hyperlinks), materials, XRefs, DbCache entries, and saved viewpoints, plus optional mesh summaries (id, name, vertex and triangle counts, material, bounding box) and a catalog of the container's sections and streams. The JSON export is core: it grows with the reader. - Links geometry to the scene tree when the file is read through its DbCache directory: every mesh points at its leaf (
NwcMesh.Node), the leaf'sElementpoints at the owning element, and IFC export uses that element's name and IFC GlobalId when present. Each mesh product gets its own mesh-scoped GlobalId. - Converts Navisworks models into
IOScenescene documents for IOViewer and other consumers through theNwcIO.Sceneadapter, a separate package.
Frozen extras (bug fixes only, see Scope and frozen features):
- Exports to standard Industry Foundation Classes (IFC2X3 & compact IFC4), binary glTF 2.0 (
.glb), and Wavefront OBJ. - Coordinates multi-model federated assemblies with 3D geometric clash detection, proximity clustering, and clash matrix execution.
- Exchanges section planes, redlines, selection sets, and search sets, and exports saved viewpoints, with Navisworks XML and buildingSMART BCF 2.1.
- Supports 4D TimeLiner construction simulation with Microsoft Project XML (
.xml) and Primavera P6 (.xer) exchange, appearance profiling, spatial grids, 3D measurement, and revision comparison. - Generates standalone, zero-dependency interactive 3D WebGL HTML viewers (
.html) with 6-sided section box, turntable orbit, and viewpoint walkthrough tours.
Install the command line tool:
dotnet tool install --global NwcIO.CliAdd the library to a .NET project:
dotnet add package NwcIOThe library targets .NET 8 and .NET 10. It uses managed code without native dependencies or Windows-only APIs and supports Windows, Linux, and macOS.
Export to IFC, glTF GLB, Wavefront OBJ, or JSON:
# Convert to IFC2X3 (default) or modern compact IFC4
nwcio model.nwc model.ifc --ifc-schema IFC4
# Convert to binary glTF 2.0 (with PBR materials and vertex normals)
nwcio model.nwc model.glb
# Export 3D meshes to Wavefront OBJ
nwcio model.nwc model.obj
# Export scene hierarchy and properties to JSON
nwcio model.nwc model.jsonCoordinate models, detect clashes, and export BCF:
# Run clash detection across a folder of federated models and export buildingSMART BCF 2.1
nwcio ./models --clash-bcf clashes.bcfzip --clash-tolerance 0.01
# Group detected clashes into proximity clusters while exporting
nwcio ./models --clash-bcf clashes.bcfzip --clash-group proximity --clash-radius 1.0
# Execute multi-discipline clash matrix across a federated folder
nwcio ./models --clash-matrix matrix.json --clash-matrix-md matrix.md --clash-matrix-bcf matrix.bcfzip
# Export standalone 3D WebGL HTML viewer with sectioning and measure tools
nwcio model.nwc --html-viewer viewer.html --grids grids.xmlTimeLiner, viewpoints, search sets, and revision diff:
# Import a 4D schedule, link it to geometry and simulate a specific date
nwcio model.nwc --timeliner-xml schedule.xml --link-timeliner --timeliner-simulate 2026-06-01 --timeliner-csv sim.csv
# Export saved viewpoints and section planes to BCF 2.1 or Navisworks XML
nwcio model.nwc --viewpoints-bcf viewpoints.bcfzip --viewpoints-xml viewpoints.xml
# Compare two model revisions (added, deleted, modified geometry & properties)
nwcio revision.nwc --diff baseline.nwc --diff-json diff.json --diff-bcf diff.bcfzipDiagnostics and progress go to standard error. Run nwcio --help for the full list of options.
Open a Navisworks document, inspect elements, and export to GLB or IFC:
using NwcIO;
using NwcIO.Model;
using NwcIO.Model.Sets;
// Open document directly from disk
var doc = NwcDocument.Open("model.nwc");
Console.WriteLine($"Source: {doc.FileInfo?.SourcePath}");
Console.WriteLine($"Meshes: {doc.Meshes.Count}, Transforms: {doc.Transforms.Count}");
// Query nodes with a search condition (category, property, operator, value)
foreach (var node in doc.FindNodes(new NwcSearchCondition("Item", "Type", NwcSearchOperator.Equals, "Wall")))
{
Console.WriteLine($"Node: {node.Name} (Class: {node.Class})");
}
// Export to binary glTF 2.0 and IFC4
doc.SaveGlb("model.glb");
doc.SaveIfc("model.ifc", new NwcIfcExportOptions { SchemaVersion = NwcIfcSchemaVersion.Ifc4 });Run 3D geometric clash detection between documents:
using NwcIO;
using NwcIO.Model;
using NwcIO.Model.Clash;
var archDoc = NwcDocument.Open("Architecture.nwc");
var mepDoc = NwcDocument.Open("MEP.nwc");
// Federate the models, then run a hard clash test with broad-phase AABB
// and narrow-phase triangle intersection. Exclude pairs inside a single model.
var assembly = NwcAssembly.Create("Federated Model", archDoc, mepDoc);
var test = new NwcClashTest("Architecture vs MEP", NwcClashTestType.Hard, tolerance: 0.01);
test.Rules.Add(NwcClashRule.SameFile()); // Compare elements from different models only.
NwcClashDetector.Run(assembly, test);
Console.WriteLine($"{test.TotalClashCount} clashes detected");
// Group clashes by spatial 3D proximity and export BCF 2.1
NwcClashGrouper.GroupByProximity(test, clusterDistance: 1.5);
NwcClashBcfExporter.Save("Clashes.bcfzip", test);See the public API for the supported surface and getting started guide for detailed workflows.
NwcIO.Scene (a separate package released with NwcIO, from IOScene 0.1.0 on) converts Navisworks models into IOScene scene documents for viewers and coordination tools; see the scene adapter page for usage and limits.
The documentation site with API references and guides is at https://ioextend.github.io/NwcIO/. offers an automatically generated overview of the repository.
Reads binary Navisworks Cache (.nwc), Navisworks Document (.nwd), and Navisworks Federated (.nwf) files. Tested against models saved across Navisworks 2016 through 2026. Scene trees of .nwd files are decoded, partition nodes included: each appended model is a top-level LcOaPartition node named after its source file. Linked Revit models (a tree that places one element under two parents) are read; the repeated placements are marked NwcNode.IsLinkPlacement.
- Version 0.13.0 is a preview. The API can evolve before 1.0.
- Geometry extraction decodes triangle strips, polylines (including two-vertex line records) and stored normals from
.nwc/.nwdgeometry records; point records and quantised positions are not supported. On the lenient path, records aboveNwcReaderOptions.MaxMeshVertices(200,000 by default) are skipped; raise the option for exceptionally large records. Vertex positions are stored as 32-bit floats, so double-precision values are rounded on save, and the writer rejects coordinates with magnitude above 1e8 (the reader's limit) before writing. - The
.nwcwriter stores vertex positions, triangle indices, mesh ids and names, and rotation/translation; it rejects scaled transforms, line meshes and indices outside the vertex buffer. Transform ids are preserved and each mesh keeps its own transform through a writer-side link stream; transforms referenced only by a mesh are written too. Saved viewpoints keep their camera parameters (including FOV, far distance and projection), comments, id, section planes and section box in a writer-specific trailer; redlines are not written. A tree passed asRootNodekeeps its names, hierarchy and property value types through a writer-specific parent marker; node-level GUID, transform, material and mesh links are not written. WhenPropertyRecordsis non-empty it is the source of truth for the scene tree. - Scene trees of files without a DbCache directory come from the lenient tag 52/53 scan: the Category/Family/Type nesting is recognized by the stored marker names (the common localized spellings are covered), a repeated marker keeps its level, and other collection names are derived from record order. Node classes other than the observed
LcRevit*names are recognized by suffix;LcRevitElementmaterial definitions stay properties. Model files read through their DbCache hierarchy are not affected by these heuristics. - The document length unit is not stored in a stream NwcIO decodes.
NwcFileInfo.LengthUnitis feet for the exact Revit loader/exporter (LcNwcLoaderPlugin:lcldrevit/nwexportrevit) and unknown otherwise; setNwcReaderOptions.LengthUnitwhen the source unit is known. Clash, grouping and diff tolerances (and the CLI--clash-tolerance,--clash-radius,--diff-tolerance) are in document units. IFC export keeps its ownNwcIfcExportOptions.LengthUnitand does not inherit the document unit yet. - The reader bounds crafted input: pointer nesting and tree height at most 256, at most 8,388,608 expanded tree nodes and 134,217,728 expanded property and property-tab references (properties from
LcOaPartitionPropscount toward the property cap), and at most one render vertex or corner per geometry-record byte. Decompressed container streams are capped at 512 MiB each and 2 GiB in total; raisingNwcReaderOptions.MaxDecompressedStreamBytesorMaxTotalDecompressedByteslifts the caps. Files beyond these limits fail withInvalidDataException. - The container reader still keeps the whole compressed file and every inflated stream in memory. Seekable inputs larger than 2 GiB are rejected with
IOExceptionbecause a single managed array cannot hold them; streaming and on-demand inflation are not implemented yet. - Writing native
.nwdfiles is not supported (export targets.nwc, open standards: IFC, GLB, OBJ, JSON, HTML, BCF, and Navisworks XML exchange).
NwcWriter / NwcDocument.Save produce an #LcUStream container that NwcIO reads back. The output uses NwcIO's own layout and has not been verified to open in Autodesk Navisworks.
- Geometry is written as one float32 vertex buffer per mesh in a single TOC chunk, with triangle indices, mesh id and name in a writer-specific trailer; normals, UVs and colors are not stored.
Materials,XRefs,DbCache,AppearanceProfiler,ClashTestsandGridSystemare not written, so they are empty or heuristic after reopening;NwcNode.HyperlinksandPropertyTabsare not written either. Scene-tree and viewpoint details are covered by the.nwcwriter item in the list above.- The partition header stores
FileInfo.SourceByteSize(0when it is not set); a missing source path becomesModel.rvtand a missing loader plugin becomesLcOpRevitExport. The container header defaults tonavisworks:448 lizlibunless a header is passed toNwcWriter. - Selection sets and TimeLiner schedules are written in NwcIO's own XML exchange layouts.
- Only NwcIO reopening the file is tested; no test opens the output in Navisworks.
NwcIO reads and writes its own format. These extras are frozen: they receive bug fixes only, with no new features or options.
- HTML viewer, GLB and OBJ export, and IFC export.
- Clash detection (triangle-level and bounding-box engines), clash grouping, clash matrix, and the HTML clash report.
- Measure, grids, revision diff, and BCF.
- TimeLiner schedule import and export, selection and search sets, appearance profiler, mesh clipper, and Navisworks XML exchange. These stay in NwcIO.
- The BVH spatial index (
NwcSpatialIndex,NwcDocument.SpatialIndex) with raycast (nwcio --raycast), section planes and boxes (NwcSectionPlane,NwcSectionBox), and the redline types (NwcRedlineand its subtypes).
JSON export (NwcDocument.SaveJson, nwcio model.nwc model.json) is not frozen: it is core and grows with the reader.
Viewing will move to IOViewer through the NwcIO.Scene adapter over the shared IOScene model. Coordination features such as clash, measure, diff, and BCF will move to a planned IOCoord package, and GLB export to a shared GLB writer in a planned IOScene.Formats package. IOCoord and IOScene.Formats are not published yet. The frozen features stay available and are removed no earlier than NwcIO 1.0, and only after a published replacement exists.
Use the .NET SDK selected by global.json (currently 10.0.401, with latestFeature roll-forward within the 10.0.x band).
From the repository root:
dotnet build NwcIO.slnx -c Release
dotnet testSee CONTRIBUTING.md. Release changes are recorded in CHANGELOG.md.
Report vulnerabilities through GitHub private vulnerability reporting in the repository's Security tab. Do not open public issues for security vulnerabilities. See SECURITY.md.
NwcIO is licensed under the MIT License. Copyright holder: mahach666.
NwcIO is not affiliated with, endorsed by or sponsored by Autodesk. Autodesk and Navisworks are trademarks of Autodesk, Inc.
The file format is read by analysing binary streams for interoperability. No Autodesk code or binaries are included.
