ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Realtime Namespace / RealtimeFeatureClass Class / GetDefinition Method
Example

In This Topic
    GetDefinition Method (RealtimeFeatureClass)
    In This Topic
    Gets the RealtimeFeatureClassDefinition of this dataset. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public new RealtimeFeatureClassDefinition GetDefinition()
    Public Shadows Function GetDefinition() As RealtimeFeatureClassDefinition

    Return Value

    The RealtimeFeatureClassDefinition of this dataset.
    Exceptions
    ExceptionDescription
    This dataset does not have a valid definition.
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Check the Realtime Feature Class is Track Aware
    using (var rfc = streamLayer.GetFeatureClass())
    using (var rfc_def = rfc.GetDefinition())
    {
      if (rfc_def.HasTrackIDField())
      {
        //Track aware
      }
    }
    
    Get the Track Id Field from the Realtime Feature class
    //Must be on QueuedTask
    using (var rfc = streamLayer.GetFeatureClass())
    using (var rfc_def = rfc.GetDefinition())
    {
      if (rfc_def.HasTrackIDField())
      {
        var fld_name = rfc_def.GetTrackIDField();
    
      }
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also