ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / GetActiveSurfaceConstraints Method
Example

In This Topic
    GetActiveSurfaceConstraints Method
    In This Topic
    Gets the set of active surface constraints. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public IReadOnlyList<SurfaceConstraint> GetActiveSurfaceConstraints()
    Public Function GetActiveSurfaceConstraints() As IReadOnlyList(Of SurfaceConstraint)

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Active Surface Constraints
    var activeSurfaceConstraints = lasDatasetLayer.GetActiveSurfaceConstraints();
    
    // clear all surface constraints (i.e. none are active)
    lasDatasetLayer.SetActiveSurfaceConstraints(null);
    
    // set all surface constraints active
    using (var lasDataset = lasDatasetLayer.GetLasDataset())
    {
      var surfaceConstraints = lasDataset.GetSurfaceConstraints();
      var names = surfaceConstraints.Select(sc => sc.DataSourceName).ToList();
      lasDatasetLayer.SetActiveSurfaceConstraints(names);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also