ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipatch Class / ToEsriShape Method / ToEsriShape(Byte[]) Method
The buffer to which the geometry will be written. The buffer must be large enough to hold the Esri shapefile formatted version of the input geometry.
Example Version

ToEsriShape(Byte[]) Method
Converts this Multipatch into an Esri shape formatted binary byte buffer and returns the size of the shapeBuffer.
Syntax
public override long ToEsriShape( 
   ref byte[] shapeBuffer
)

Parameters

shapeBuffer
The buffer to which the geometry will be written. The buffer must be large enough to hold the Esri shapefile formatted version of the input geometry.

Return Value

The number of bytes used to store this instance in the input shapeBuffer.
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, Windows 10

ArcGIS Pro version: 3 or higher.
See Also