Navisworks: Document¶
9 nodes. Types ending in [] are lists. An input with a default is optional.
Nodes¶
Application.Version¶
The running Navisworks product name and API version (report headers, compatibility checks).
No inputs.
Outputs
| Output | Type |
|---|---|
product |
string |
apiVersion |
string |
Returns: Product name (e.g. "Navisworks Manage 2024") and "major.minor" API version.
Tags: application version product api navisworks
Document.AppendFiles¶
Appends design files to the document — Directory.FindFiles → Document.AppendFiles → Document.Save is the Navisworks Batch Utility in three nodes. Takes the whole list of paths (several wires are joined); relative paths mean next to the graph. Cached model items from earlier runs are invalidated.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
filePaths any number of wires required |
string[] |
— | The files to append, in order (e.g. from Directory.GetFiles). |
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type |
|---|---|
document |
Document |
models |
ModelItem[] |
Returns: The document and the newly appended models.
Tags: document append files add batch federate combine
Document.Current¶
The active Navisworks document.
No inputs.
Outputs
| Output | Type | What it gives |
|---|---|---|
document |
Document |
The active document. |
Tags: document active current navisworks
Document.Info¶
File name, title, display units and model count of a document, read again on every run. The units output is the same text as Units.Current.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type |
|---|---|
fileName |
file |
title |
string |
units |
string |
modelCount |
integer |
Returns: File name, title, units and model count.
Tags: document info filename title units
Document.Merge¶
Merges another Navisworks file into the document with duplicate resolution — pulls a colleague's review artifacts (sets, viewpoints, comments) into yours. Not a model-diff tool. A list of files merges them one after the other. A relative path means next to the graph. Cached model items from earlier runs are invalidated.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
filePath required |
string |
— | The .nwf/.nwd to merge (e.g. a colleague's review file). |
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type | What it gives |
|---|---|---|
document |
Document |
The document, with the file's contents merged in. |
Tags: document merge combine review duplicate nwf
Document.Models¶
The models (appended source files) loaded in a document, read again on every run.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type | What it gives |
|---|---|---|
models |
Model[] |
All loaded models. |
Tags: document models files appended
Document.Open¶
Opens ONE file into the document, REPLACING its current contents (the headless batch driver). Every model item from before the open is invalidated — re-query items downstream of this node. A list of paths is an error, because each file would replace the one before; to add several files use Document.AppendFiles. A relative path means next to the graph.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
filePath required |
string |
— | The file to open (.nwd/.nwf/.nwc or any appendable design format). One path only; a relative path means next to the graph. |
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type | What it gives |
|---|---|---|
document |
Document |
The document, now holding the opened file. |
Tags: document open file load batch nwd nwf
Document.Refresh¶
Refreshes every linked/appended file from disk — Home > Refresh, scriptable. Returns true when anything was updated. Cached model items from earlier runs are invalidated.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type | What it gives |
|---|---|---|
updated |
boolean |
True when any file was updated from disk. |
Tags: document refresh update reload linked files
Document.Save¶
Saves the document as .nwf (references to the source files) or .nwd (a published snapshot with the appearance overrides baked in) to the given path; the extension decides. This is the node for publishing an NWD (it replaces Export.NWD). An existing file is replaced. A relative path means next to the graph, and the folder is created when missing. Inside a node group that is used twice, a fixed path is written twice: the second save replaces the first.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
filePath required |
string |
— | Destination path ending in .nwf or .nwd (a relative path means next to the graph); the directory is created when missing, an existing file is replaced. |
document |
Document |
null |
The document (defaults to the active document). |
Outputs
| Output | Type | What it gives |
|---|---|---|
filePath |
string |
The written file path. |
Tags: document save nwf nwd publish write export export nwd snapshot batch