ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StreamLayer Class / StartStreaming Method
Example

In This Topic
    StartStreaming Method (StreamLayer)
    In This Topic
    Sets the stream layer to a state where it starts listening to broadcasts from a real-time data source.
    Syntax
    Public Sub StartStreaming() 
    public void StartStreaming()
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    When you create a StreamLayer, it starts listening by default.
    Example
    Check the Stream Layer connection state
    {
      if (!streamLayer.IsStreamingConnectionOpen)
      // Note: call within QueuedTask.Run()
      {
        streamLayer.StartStreaming();
      }
    }
    Start and stop streaming
    {
      // Note: call within QueuedTask.Run()
      {
        //Start...
        streamLayer.StartStreaming();
        //Stop...
        streamLayer.StopStreaming();
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also