ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipatchBuilderEx Class / GetPoint Method
The patch index. Must be in the range [0, Patches.Count - 1] inclusive.
The point index. Must be in the range [0, Patch.Coords.Count - 1] inclusive.
Example

In This Topic
    GetPoint Method (MultipatchBuilderEx)
    In This Topic
    A convenience method to get the MapPoint from the specified patch at the specified point index.
    Syntax
    Public Function GetPoint( _
       ByVal patchIndex As Integer, _
       ByVal pointIndex As Integer _
    ) As MapPoint
    public MapPoint GetPoint( 
       int patchIndex,
       int pointIndex
    )

    Parameters

    patchIndex
    The patch index. Must be in the range [0, Patches.Count - 1] inclusive.
    pointIndex
    The point index. Must be in the range [0, Patch.Coords.Count - 1] inclusive.
    Exceptions
    ExceptionDescription
    The pointIndex is less than zero or is greater than or equal to the patch point count.
    Remarks
    If this MultipatchBuilderEx has a spatial reference, then the returned MapPoint will have that spatial reference. One difference between this method and Patch.GetPoint is that the MapPoint returned from this method inherits the attribute awareness from this builder. For example, if the Patch.Ms list is null but this builder HasM property is true, then the returned MapPoint HasM property is true, and it has a default M-value. Another difference is that the MapPoint returned from Patch.GetPoint always has a null spatial reference.
    Example
    Construct Multipatch from another Multipatch
    {
      TextureResource brickTextureResource = null;
      BasicMaterial brickMaterialTexture = new BasicMaterial();
      var coords = new List<Coordinate3D>();
    
      // create the multipatchBuilderEx object
      var builder = new ArcGIS.Core.Geometry.MultipatchBuilderEx(multipatch);
    
      // check some properties
      bool hasM = builder.HasM;
      bool hasZ = builder.HasZ;
      bool hasID = builder.HasID;
      bool isEmpty = builder.IsEmpty;
      bool hasNormals = builder.HasNormals;
    
      var patches = builder.Patches;
      int patchCount = patches.Count;
    
      // if there's some patches
      if (patchCount > 0)
      {
        int pointCount = builder.GetPatchPointCount(0);
    
        // replace the first point in the first patch
        if (pointCount > 0)
        {
          // get the first point
          var pt = builder.GetPoint(0, 0);
          builder.SetPoint(0, 0, mapPoint);
        }
    
        // check which patches currently contain the texture
        var texture = builder.QueryPatchIndicesWithTexture(brickTextureResource);
    
        // assign a texture material
        patches[0].Material = brickMaterialTexture;
      }
    
      // update the builder for M awareness
      builder.HasM = true;
      // synchronize the patch attributes to match the builder attributes
      //   in this instance because we just set HasM to true on the builder, each patch will now get a default M value for it's set of coordinates
      builder.SynchronizeAttributeAwareness();
    
      // call ToGeometry to get the multipatch
      multipatch = builder.ToGeometry() as Multipatch;
    
      // multipatch.HasM will be true
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also