PathClass

A sequence of connected segments.

Supported Platforms

Windows, Solaris, Linux

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IClone (esriSystem) Provides access to members that control cloning of objects.
IConstructPath Provides access to members that construct a path using other geometries and measures.
ICurve Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).
IGeometry Provides access to members that describe properties and behavior of all geometric objects.
IPath Provides access to members that identify a path and define its behavior.
IPointCollection Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
IPointCollection4 Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
ISegmentCollection Provides access to members that manipulate the segments of a path, ring, polyline, or polygon.
ISupportErrorInfo (esriSystem)
ITransform2D Provides access to methods for transforming geometries using either specific parameters or arbitrary transformation objects (affine transformations, geographic transformations, etc.).
ITransform3D Provides access to methods for transforming 3D geometries using either specific parameters or arbitrary transformation objects.
IXMLSerialize (esriSystem) Provides access to members that XML serialize and deserialize an object to/from XML.
private static object _missing = Type.Missing;

  

          public static IGeometry GetPathGeometry()

          {

                  const double PathVertexCount = 3;



               IPointCollection pointCollection = new PathClass();

  

                 for (int i = 0; i < PathVertexCount; i++)

                 {

                        pointCollection.AddPoint(GetPoint(), ref _missing, ref _missing);

                 }

  

              return pointCollection as IGeometry;

         }

 

          private static IPoint GetPoint()

          {

              const double Min = -10;

              const double Max = 10;

  

              Random random = new Random();

  

              double x = Min + (Max - Min) * random.NextDouble();

              double y = Min + (Max - Min) * random.NextDouble();

              double z = Min + (Max - Min) * random.NextDouble();

  

              return ConstructPoint3D(x, y, z);

          }

  

           private  static  IPoint  ConstructPoint3D(double  x,  double  y,  double  z)

          {

               IPoint  point = ConstructPoint2D(x, y);

              point.Z = z;

 

              return  point;

          }

 

 



           private  static  IPoint  ConstructPoint2D(double  x,  double  y)

          {

               IPoint  point =  new  PointClass();

              point.PutCoords(x, y);

  

               return  point;

         }

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close