Children of the group
Namespace: Autodesk.Navisworks.Api
Assembly: Autodesk.Navisworks.Api (in Autodesk.Navisworks.Api.dll)
Syntax
Examples
CopyWriting out the selection sets structure
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using System.Text;
using Autodesk.Navisworks.Api.Controls;
static public string WriteSelectionSetContent(SavedItem item, string label, string lineText)
{
string output = lineText + "+ " + label + "\n";
if (item.IsGroup)
{
lineText += " ";
foreach (SavedItem childItem in ((GroupItem)item).Children)
{
output += WriteSelectionSetContent(childItem, childItem.DisplayName, lineText);
}
}
return output;
}
static public void ListSelectionSets()
{
string output =
WriteSelectionSetContent(
Autodesk.Navisworks.Api.Application.ActiveDocument.SelectionSets.RootItem,
Autodesk.Navisworks.Api.Application.ActiveDocument.Title,
"");
MessageBox.Show(output);
}
See Also