ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipatch Class / ToEsriShape Method / ToEsriShape() Method
Example

In This Topic
    ToEsriShape() Method
    In This Topic
    Converts this Multipatch into an Esri shape formatted binary byte buffer.
    Syntax
    Public Overloads Overrides NotOverridable Function ToEsriShape() As Byte()
    public override byte[] ToEsriShape()

    Return Value

    The geometry as a formatted binary byte buffer.
    Example
    Construct Multipatch
    {
      // export to binary xml
      string binaryXml = multipatch.ToBinaryXml();
    
      // import from binaryXML - methods need to run on the MCT
      Multipatch binaryMultipatch = MultipatchBuilderEx.FromBinaryXml(binaryXml);
    
      // xml export / import
      string xml = multipatch.ToXml();
      Multipatch xmlMultipatch = MultipatchBuilderEx.FromXml(xml);
    
      // esriShape export/import
      byte[] buffer = multipatch.ToEsriShape();
      Multipatch esriPatch = MultipatchBuilderEx.FromEsriShape(buffer);
    
      // or use GeometryEngine
      Multipatch patchImport = GeometryEngine.Instance.ImportFromEsriShape(EsriShapeImportFlags.EsriShapeImportDefaults, buffer, multipatch.SpatialReference) as Multipatch;
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also