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

Navisworks: Search

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

Search.ByGuid

Finds the items whose instance GUID equals any of the given GUIDs (text, a 22-character IFC GlobalId, or GUID values) in one pass over the model — not one search per GUID — and lists the GUIDs that matched nothing; walks every item of the document once (O(items)).

Inputs

Input Type Default What it does
guids any number of wires required any[] — The GUIDs: text such as "3f81e10a-25b0-49ff-9520-63f2a763150a" (or a 22-character IFC GlobalId) or GUID values.
document Document null The document to search (defaults to the active document).

Outputs

Output Type
items ModelItem[]
missing string[]

Returns: The items found, in the order of the GUIDs, and the GUIDs that matched no item.

Tags: search find guid uuid id instance lookup ifc globalid missing

Search.ByProperty

Finds every model item by one property, like Find Items with its condition drop-down: equals a value, contains text, matches a wildcard pattern (* and ?), is >, >=, < or <= a number (e.g. pipes with Diameter > 100), or exists (the item carries the property at all, with any value; leave propertyName empty to ask only for the tab). Wire a LIST into value to match ANY of its entries ("is one of") in a single pass over the model; an empty list matches nothing, and List Levels @L1 on value runs one search per entry instead. Wire items into within to look only inside those items and their descendants (a scoped search that refines an earlier result). Replaces Search.HasProperty, Search.HasCategory and Search.InItems.

Inputs

Input Type Default What it does
categoryName required string — Category display name (e.g. "Element"). Internal names do not match.
propertyName required string — Property display name (e.g. "Category"). Internal names do not match. With mode "exists", leave it empty to ask only whether the item carries the category (tab).
value any null What to look for: any value for "equals"; text for "contains" and "wildcard" (* matches any text, ? one character); a number for >, >=, < and <=; not used by "exists". A list means "any of these": an item matches when it matches at least one entry, and the model is walked once however long the list is. An empty list matches nothing.
mode string "equals" How the property is matched: equals, contains, wildcard, >, >=, <, <= or exists.
resolveTo string "Self" Optional selection resolution applied to the matches, like Options > Interface > Selection > Resolution in Navisworks: Self (default, keep matches as found), File, Layer, FirstObject, LastObject, LastUnique or Geometry.
within any number of wires ModelItem[] null Optional: search only inside these items and their descendants (a scoped search that refines an earlier result). Leave it unwired to search the whole model; an empty list searches nothing.
document Document null The document to search (defaults to the active document).

Outputs

Output Type What it gives
items ModelItem[] All matching model items.

Tags: search find filter property equals contains wildcard pattern compare greater less numeric text query has exists audit category tab scoped within refine subset one of any of in list