ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / SetActiveSurfaceConstraints Method
A list of the dataset names that are surface constraints. If null, then all constraints are cleared.
Example

In This Topic
    SetActiveSurfaceConstraints Method
    In This Topic
    Sets the group of active surface constraints. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void SetActiveSurfaceConstraints( 
       List<string> surfaceConstraintNames
    )
    Public Sub SetActiveSurfaceConstraints( _
       ByVal surfaceConstraintNames As List(Of String) _
    ) 

    Parameters

    surfaceConstraintNames
    A list of the dataset names that are surface constraints. If null, then all constraints are cleared.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    To clear all surface constraints, pass null or an empty list.
    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