|
![]() |
A collection of DataProperty objects.
Namespace: Autodesk.Navisworks.Api
Assembly: Autodesk.Navisworks.Api (in Autodesk.Navisworks.Api.dll)
Syntax
Visual Basic |
---|
Public Class DataPropertyCollection _ Inherits NativeHandle _ Implements IList(Of DataProperty), IList, _ ICollection(Of DataProperty), ICollection, IEnumerable(Of DataProperty), _ IEnumerable |
C# |
---|
public class DataPropertyCollection : NativeHandle, IList<DataProperty>, IList, ICollection<DataProperty>, ICollection, IEnumerable<DataProperty>, IEnumerable |
Visual C++ |
---|
public ref class DataPropertyCollection : public NativeHandle, IList<DataProperty^>, IList, ICollection<DataProperty^>, ICollection, IEnumerable<DataProperty^>, IEnumerable |
Remarks
A collection of DataProperty objects.
This class can commonly be accessed using PropertyCategory.Properties where the DataProperty represent a property and value for a given PropertyCategory.
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 IteratePropertyCategoryDataPropertys() { //create a list to store the category names StringBuilder output = new StringBuilder(); //check there is a valid ActiveDocument if (Autodesk.Navisworks.Api.Application.ActiveDocument != null && !Autodesk.Navisworks.Api.Application.ActiveDocument.IsClear) { //iterate the ModelItems in the current selection foreach (ModelItem item in Autodesk.Navisworks.Api.Application.ActiveDocument.CurrentSelection.SelectedItems) { //iterate the item's PropertyCategory entries foreach (PropertyCategory category in item.PropertyCategories) { //iterate over the DataPropertys foreach (DataProperty dataProperty in category.Properties) { //add content for display output.Append(string.Format( "PropertyCategory: ({0} / {1}) DataProperty: CombinedName='{2}', Value='{3}'", category.DisplayName, category.Name, dataProperty.CombinedName, (dataProperty.Value == null ? "" : dataProperty.Value.ToString()))); } } } //output to the screen MessageBox.Show(output.ToString()); } }
Inheritance Hierarchy
System..::..Object
Autodesk.Navisworks.Api..::..NativeHandle
Autodesk.Navisworks.Api..::..DataPropertyCollection
Autodesk.Navisworks.Api..::..NativeHandle
Autodesk.Navisworks.Api..::..DataPropertyCollection