SpatialAnchorExporter.TryExportAnchorAsync(SpatialAnchor, SpatialAnchorExportPurpose, IOutputStream) SpatialAnchorExporter.TryExportAnchorAsync(SpatialAnchor, SpatialAnchorExportPurpose, IOutputStream) SpatialAnchorExporter.TryExportAnchorAsync(SpatialAnchor, SpatialAnchorExportPurpose, IOutputStream) SpatialAnchorExporter.TryExportAnchorAsync(SpatialAnchor, SpatialAnchorExportPurpose, IOutputStream) SpatialAnchorExporter.TryExportAnchorAsync(SpatialAnchor, SpatialAnchorExportPurpose, IOutputStream) Method

Definition

Exports a spatial anchor to a stream for sharing or relocalization. This allows multiple devices to reason about the same locations in their users' surroundings.

public : IAsyncOperation<Platform::Boolean> TryExportAnchorAsync(SpatialAnchor anchor, SpatialAnchorExportPurpose purpose, IOutputStream stream)
IAsyncOperation<bool> TryExportAnchorAsync(SpatialAnchor anchor, SpatialAnchorExportPurpose purpose, IOutputStream stream) const;
public IAsyncOperation<bool> TryExportAnchorAsync(SpatialAnchor anchor, SpatialAnchorExportPurpose purpose, IOutputStream stream)
Public Function TryExportAnchorAsync(anchor As SpatialAnchor, purpose As SpatialAnchorExportPurpose, stream As IOutputStream) As IAsyncOperation(Of bool)
Windows.Perception.Spatial.SpatialAnchorExporter.tryExportAnchorAsync(anchor, purpose, stream).done( /* Your success and error handlers */ );

Parameters

anchor
SpatialAnchor SpatialAnchor SpatialAnchor

The spatial anchor to export.

purpose
SpatialAnchorExportPurpose SpatialAnchorExportPurpose SpatialAnchorExportPurpose

The purpose of the export, sharing or relocalization.

stream
IOutputStream IOutputStream IOutputStream

The stream to export the anchor to.

Returns

Operation that triggers once the export has been attempted, providing true if the export succeeded; otherwise, false.

Additional features and requirements

Capabilities
spatialPerception