private void RecurseItems(SavedItem oSI) { try { Autodesk.Navisworks.Api.GroupItem group = oSI as Autodesk.Navisworks.Api.GroupItem; if (null != group)//is a group { foreach (SavedItem oSII in group.Children) { RecurseItems(oSII); } } else { _savedViewpoints.Add((SavedViewpoint)oSI); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void RecurseItems(SavedItem savedItem) { try { Autodesk.Navisworks.Api.GroupItem group = savedItem as Autodesk.Navisworks.Api.GroupItem; //is a group if (null != group) { foreach (SavedItem child in group.Children) { RecurseItems(child); } } else { _savedViewpoints.Add((SavedViewpoint)savedItem); } } catch { //do nothing } }
/// <summary> /// forther iteration on the three of saved viewpoints /// </summary> private void RecurseItems(SavedItem oSI) { try { Autodesk.Navisworks.Api.GroupItem group = oSI as Autodesk.Navisworks.Api.GroupItem; if (null != group)//is a group { foreach (SavedItem oSII in group.Children) { RecurseItems(oSII); } } else { IssueBCF ib = new IssueBCF(); ib.viewpoint = oSI as SavedViewpoint; jira.IssuesBCFCollection.Add(ib); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }