© 2010 Autodesk
Introduction to the Navisworks 2011 .NET API
Querying The Model
Active Document
Document doc = Application.ActiveDocument;
Get First Model
Model model = doc.Models[0];
Get Root Item
ModelItem root = model.RootItem;
Query Item
bool is_hidden = root.IsHidden;
First, get access to the active document. Mention MainDocument property. Currently same as ActiveDocument, but in future we might support multiple documents (Roamer is SDI).
Then access the first model. Can have multiple models appended into one document. Here, accessing as an array, zero based as usual.
The get hold of the root model item. This will normally be the partition. From here, can traverse children manually. Will cover items later on.
The query the model item.