ArcGIS Pro 3.0 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 override byte[] ToEsriShape()
    Public Overloads Overrides NotOverridable Function ToEsriShape() As Byte()

    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, Windows 10, Windows 8.1

    See Also