ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / Terrain Class / GetDataSources Method
Example

In This Topic
    GetDataSources Method
    In This Topic
    Gets the list of TerrainDataSource used in this terrain. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public IReadOnlyList<TerrainDataSource> GetDataSources()
    Public Function GetDataSources() As IReadOnlyList(Of TerrainDataSource)

    Return Value

    An IReadOnlyList of TerrainDataSource.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run
    Example
    Get datasources from a Terrain
    var dsCount = terrain.GetDataSourceCount();
    IReadOnlyList<ArcGIS.Core.Data.Analyst3D.TerrainDataSource> dataSources = terrain.GetDataSources();
    foreach (var ds in dataSources)
    {
      var dsName = ds.DataSourceName;
      var surfaceType = ds.SurfaceType;
      var maxResolution = ds.MaximumResolution;
      var minResolution = ds.MinimumResolution;
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also