ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / Terrain Class / GetDataSourceCount Method
Example

In This Topic
    GetDataSourceCount Method
    In This Topic
    Gets the number of datasources used in this terrain. Also see GetDataSources. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetDataSourceCount() As Integer
    public int GetDataSourceCount()

    Return Value

    The number of datasources used in this terrain.
    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 = terrainDataset.GetDataSourceCount();
      IReadOnlyList<ArcGIS.Core.Data.Analyst3D.TerrainDataSource> dataSources = terrainDataset.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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.2 or higher.
    See Also