ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinDataset Class / SearchTriangles Method
Filter by parameters. See TinTriangleFilter. If null, then all triangles will be retrieved.
Example

In This Topic
    SearchTriangles Method (TinDataset)
    In This Topic
    Retrieves the triangles in the TIN that satisfy the criteria set in the filter. If no filter is set, all triangles will be retrieved. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public TinTriangleCursor SearchTriangles( 
       TinTriangleFilter filter
    )
    Public Function SearchTriangles( _
       ByVal filter As TinTriangleFilter _
    ) As TinTriangleCursor

    Parameters

    filter
    Filter by parameters. See TinTriangleFilter. If null, then all triangles will be retrieved.

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    To ensure maximum robustness, callers should explicitly dispose of the returned TinTriangleCursor in either a using statement or a finally block.
    Example
    Search for TIN Triangles
    // search all triangles
    using (ArcGIS.Core.Data.Analyst3D.TinTriangleCursor triangleCursor = tinDataset.SearchTriangles(null))
    {
      while (triangleCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinTriangle triangle = triangleCursor.Current)
        {
    
        }
      }
    }
    
    // search within an extent
    ArcGIS.Core.Data.Analyst3D.TinTriangleFilter triangleFilter = new ArcGIS.Core.Data.Analyst3D.TinTriangleFilter();
    triangleFilter.FilterEnvelope = envelope;
    using (ArcGIS.Core.Data.Analyst3D.TinTriangleCursor triangleCursor = tinDataset.SearchTriangles(triangleFilter))
    {
      while (triangleCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinTriangle triangle = triangleCursor.Current)
        {
    
        }
      }
    }
    
    // search all "inside" triangles
    triangleFilter = new ArcGIS.Core.Data.Analyst3D.TinTriangleFilter();
    triangleFilter.FilterType = ArcGIS.Core.Data.Analyst3D.TinFilterType.InsideDataArea;
    using (ArcGIS.Core.Data.Analyst3D.TinTriangleCursor triangleCursor = tinDataset.SearchTriangles(triangleFilter))
    {
      while (triangleCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinTriangle triangle = triangleCursor.Current)
        {
    
        }
      }
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also