ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipatch Class / ToBinaryXml Method
Example

In This Topic
    ToBinaryXml Method
    In This Topic
    Serializes this geometry instance into an ArcGIS binary XML geometry representation.
    Syntax
    Public Function ToBinaryXml() As String
    public string ToBinaryXml()

    Return Value

    Geometry represented as a binary XML string.
    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