Skip to content
Get on GitHub Autodesk App Store - coming soon

Navisworks: ModelItem

15 nodes. Types ending in [] are lists. An input with a default is optional.

ModelItem.AncestorNameMatches

Walks an item's ancestor chain (nearest first) and tests each name against the text: contains / starts with / ends with, or their "doesn't" negations — true when NO ancestor matches. The branch-membership filter: is this item under the "Steel" branch, inside a file starting with "ARCH-", NOT under anything ending in "-DEMO"? Lace over item lists for the bool mask (List.FilterByBoolMask), and the matching ancestor itself comes out too. Names are matched as the tree shows them (class name when unnamed), case-insensitive unless caseSensitive.

Inputs

Input Type Default What it does
item required ModelItem — The model item whose ancestor chain to test.
text required string — The text to look for in the ancestor names.
mode string "contains" contains, doesn't contain, starts with, doesn't start with, ends with or doesn't end with. The "doesn't" modes are true when NO ancestor matches.
includeSelf boolean false True also tests the item's own name, not just its ancestors'.
caseSensitive boolean false True matches exact casing; false (default) ignores case.

Outputs

Output Type
matches boolean
ancestor ModelItem
ancestorName string

Returns: Whether the condition holds, plus the nearest matching ancestor and its name (null/"" when nothing matched — always so for the "doesn't" modes when they hold).

Tags: item ancestor name contains starts ends branch under tree hierarchy filter check

ModelItem.AncestorPropertyMatches

The general form of ModelItem.AncestorNameMatches: walks an item's ancestor chain (nearest first) and tests ANY property you name — category + property as the Properties window shows them — against the text: contains / starts with / ends with or their "doesn't" negations (true when NO ancestor matches). "Is this item inside a branch whose Source File contains STEEL?", "under a level whose Name starts with B?" Ancestors without the property simply don't match. Lace over item lists for a List.FilterByBoolMask mask.

Inputs

Input Type Default What it does
item required ModelItem — The model item whose ancestor chain to test.
categoryName required string — The property category (tab) name, as the Properties window shows it (e.g. "Element", "Item").
propertyName required string — The property name inside that category (e.g. "Name", "Type", "Source File").
text required string — The text to look for in the ancestors' property values.
mode string "contains" contains, doesn't contain, starts with, doesn't start with, ends with or doesn't end with. The "doesn't" modes are true when NO ancestor matches.
includeSelf boolean false True also tests the item's own property, not just its ancestors'.
caseSensitive boolean false True matches exact casing; false (default) ignores case.

Outputs

Output Type
matches boolean
ancestor ModelItem
value any

Returns: Whether the condition holds, plus the nearest matching ancestor and its property value (null/"" when nothing matched — always so for the "doesn't" modes when they hold).

Tags: item ancestor property contains starts ends branch under tree hierarchy filter check category

ModelItem.Ancestors

The chain of parents of a model item, up to its model root.

Inputs

Input Type Default What it does
item required ModelItem — The model item.
includeSelf boolean false True to include the item itself.

Outputs

Output Type What it gives
ancestors ModelItem[] The ancestors (nearest first).

Tags: item ancestors parents tree hierarchy

ModelItem.BoundingBox

The axis-aligned bounding box of a model item, in document units. Wire a LIST in and lacing gives one box per item — for one box around them all use ModelItem.CombinedBoundingBox. An item with no geometry of its own below it (an empty layer or group) has no box: the result is null and the node shows a warning, so List.Clean drops it and BoundingBox.Center / Size are not fed an empty box.

Inputs

Input Type Default What it does
item required ModelItem — The model item.
ignoreHidden boolean false True to exclude hidden geometry from the box.

Outputs

Output Type What it gives
boundingBox BoundingBox3D The item's bounding box, in document units; null (with a warning) when the item carries no geometry.

Tags: item boundingbox bounds extents bbox

ModelItem.Children

The direct children of a model item.

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type What it gives
children ModelItem[] The item's direct children.

Tags: item children tree hierarchy

ModelItem.CombinedBoundingBox

ONE bounding box fitting all the given items together (per-group when wired a list of groups) — frame a whole cluster for a section box or zoom. For one box per item use ModelItem.BoundingBox.

Inputs

Input Type Default What it does
items any number of wires required ModelItem[] — The model items to enclose.
ignoreHidden boolean false True to exclude hidden geometry from the box.

Outputs

Output Type What it gives
boundingBox BoundingBox3D The combined axis-aligned bounding box, in document units.

Tags: boundingbox combined union group fit all extents cluster bbox

ModelItem.CommonAncestor

The deepest common ancestor of the given items in the selection tree — the smallest branch (room, level, block, model) that contains them all. Null when they share no ancestor.

Inputs

Input Type Default What it does
items any number of wires required ModelItem[] — The model items (e.g. a multi-selection).

Outputs

Output Type What it gives
ancestor ModelItem The last (deepest) common ancestor in the selection tree — the smallest branch that contains them all — or null when they share none (different models).

Tags: item common ancestor shared parent tree lca branch container

ModelItem.Descendants

All descendants of a model item (the whole subtree below it).

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type What it gives
descendants ModelItem[] Every descendant, depth first.

Tags: item descendants tree subtree all

ModelItem.IfcGuid

The 22-character IFC GlobalId of an item: the value of its GlobalId / IfcGUID / IFC GUID / Guid property when it has one (as the Navisworks IFC import creates it), otherwise its InstanceGuid encoded the same way; null when it has neither. Wire a list of items to get one id per item.

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type What it gives
ifcGuid string The 22-character IFC GlobalId, or null when the item has none.

Tags: ifc guid globalid identity id bim bcf item

ModelItem.Info

Everything quick to know about a model item in one node: its display name (the class name when it has none), class name and localized class name (layer/group/geometry detection), instance GUID ("" when absent, a stable cross-run identity for reports), whether it carries geometry and whether it is hidden right now. Use the outputs you need; replaces the single-property nodes ModelItem.DisplayName, ClassInfo, HasGeometry, IsHidden and InstanceGuid. The IFC GlobalId (ModelItem.IfcGuid), the source file (ModelItem.SourceInfo) and the tree path (ModelItem.Path) are separate nodes because they read more.

Inputs

Input Type Default What it does
item required ModelItem — The model item. Wire a list and lacing gives one result per item (each output becomes a list).

Outputs

Output Type
name string
className string
classDisplayName string
guid string
hasGeometry boolean
isHidden boolean

Returns: The display name (the class name when unnamed), the internal and localized class names, the instance GUID text ("" when absent), whether the item carries geometry and whether it is hidden.

Tags: item info name displayname label class classname type kind geometry solid mesh hidden visible state guid id identity instance

ModelItem.ModelName

The name of the model/file an item comes from (the root of its selection tree, e.g. "Structure.nwc"). Combine with ClashResult.Items to filter clashes by discipline/source model — e.g. keep only clashes between the MEP model and the Structure model. ModelItem.SourceInfo answers the same question with more detail (the source file name, the item type and the owning model); Model.Statistics labels a model without a name by its file name, this node gives an empty text.

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type What it gives
modelName string The root ancestor's display name, e.g. "Structure.nwc".

Tags: item model file source discipline root origin

ModelItem.Parent

The parent of a model item (null for a model root).

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type What it gives
parent ModelItem The parent item, or null for a model root.

Tags: item parent tree hierarchy up

ModelItem.Path

The selection-tree path of an item as one text, from its model file down to the item ("Structure.nwc > Level 1 > Walls > Basic Wall") — a label for BCF titles, clash names and reports. The same text is the @Path column of Properties.ToTable. ModelItem.Info gives only the item's own name.

Inputs

Input Type Default What it does
item required ModelItem — The model item. Wire a list and lacing gives one path per item.
separator string " > " The text between the names (default " > ").

Outputs

Output Type What it gives
path string The names from the model file down to the item, joined by the separator; an unnamed level shows its class name and a level with neither is left out.

Tags: item path breadcrumb tree hierarchy location label full name

ModelItem.ReferencePoints

Candidate base/reference points of an item, in world document units. Navisworks has NO insertion-point API — bboxCenter/bboxMin come from the bounding box; localOrigin is the item's local-frame origin (COM fragment transform), which approximates the source insertion point for many formats (null when unavailable, e.g. non-geometry items or outside a live session). Source properties (Revit "Location" etc.) remain readable via Properties.Value. ModelItem.GetTransform.origin is a third base point: the translation of the item's active transform, which follows ModelItem.Translate and the other transform nodes.

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type
bboxCenter Point
bboxMin Point
localOrigin Point

Returns: Bounding-box center, bounding-box minimum corner, and the local-frame origin (world coordinates; null when the item has no geometry or the value is unavailable).

Tags: item reference base point insertion origin location center

ModelItem.SourceInfo

One-node answer to "which file did this element come from and what is it": the source file name, the Item-tab Type (falling back to the item's class name), and the owning appended model. ModelItem.ModelName is the short form (the model root's name only).

Inputs

Input Type Default What it does
item required ModelItem — The model item.

Outputs

Output Type
sourceFileName file
itemType string
model ModelItem

Returns: The source file name, the Item-tab type (falls back to the class display name), and the owning model.

Tags: item source file origin type model provenance