|
![]() |
Represents geometry within the model hierarchy
Namespace: Autodesk.Navisworks.Api
Assembly: Autodesk.Navisworks.Api (in Autodesk.Navisworks.Api.dll)
Syntax
Visual Basic |
---|
Public Class ModelGeometry _ Inherits NativeHandle |
C# |
---|
public class ModelGeometry : NativeHandle |
Visual C++ |
---|
public ref class ModelGeometry : public NativeHandle |
Remarks
Instances of this class can be found from the root Descendents of ModelItem by the property ModelItem.Geometry.
A depth search for the first instances of this class, through the Descendants of ModelItems, can be found using ModelItem.FindFirstGeometry.
Examples

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 void OutputFirstGeometry() { try { if (Autodesk.Navisworks.Api.Application.ActiveDocument != null && !Autodesk.Navisworks.Api.Application.ActiveDocument.IsClear) { ModelGeometry first = Autodesk.Navisworks.Api.Application.ActiveDocument. Models[0].RootItem.FindFirstGeometry(); if (first != null) { string text = string.Empty; text = string.Format("ActiveColor = {0}" + "\nActiveTransparency = {1}" + "\nBoundingBox = {2}" + "\nFragmentCount {3}" + "\nIsSolid {4}" + "\nItem {5}" + "\nOriginalColor {6}" + "\nOriginalTransparency {7}" + "\nPermanentColor {8}" + "\nPermanentTransparency {9}", first.ActiveColor.ToString(), first.ActiveTransparency, first.BoundingBox.ToString(), first.FragmentCount, first.IsSolid.ToString(), first.Item.ToString(), first.OriginalColor.ToString(), first.OriginalTransparency, first.PermanentColor.ToString(), first.PermanentTransparency); MessageBox.Show(text); } } } catch (Exception e) { MessageBox.Show(e.Message + "\n\n" + e.ToString()); } }
Inheritance Hierarchy
System..::..Object
Autodesk.Navisworks.Api..::..NativeHandle
Autodesk.Navisworks.Api..::..ModelGeometry
Autodesk.Navisworks.Api..::..NativeHandle
Autodesk.Navisworks.Api..::..ModelGeometry