PointIterator Class

A class used to iterate individual points in a PointCollection.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DB.PointCloudsPointIterator

Namespace: Autodesk.Revit.DB.PointClouds
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class PointIterator : IEnumerator<CloudPoint>

The PointIterator type exposes the following members.

Properties
 NameDescription
Public propertyCurrent 
Public propertyCurrentObject 
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the PointIterator
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFree Completes lifetime of the iterator. Call it when done using the iterator.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsDone Identifies if the iteration has reached the end of the collection.
Public methodMoveNext Increments the iterator to the next point in the collection.
Public methodReset Resets the iterator to the beginning of the collection.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
Points may be iterated in two different ways:
  1. In the traditional IEnumerable interface, you can iterate the resulting points directly from the PointCollection.
  2. In an unsafe interface usable only from C# and C++/CLI, you can get a pointer to the point storage of the collection and access the points directly in memory. Although you must deal with pointers directly, there may be performance improvements when traversing large buffers of points.
Regardless of the approach used to obtain the points, the points are reported in the coordinate system of the point cloud. If you need the points in the coordinate system of the model, you will need to transform the point in those coordinates. The most direct way to do this is to obtain the transformation matrix from the PointCloudInstance (GetTransform()), convert the CloudPoint to an XYZ using the implicit conversion operator, and use Transform.OfPoint(XYZ).
See Also