CanSetElevationTypeDefinition Method
Gets whether the elevation type definition can be set on the layer.
This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- elevationTypeDefinition
Return Value
A boolean indicating whether the elevation type definition is valid.
Set Elevation Mode for a layer
//Note: Use QueuedTask.Run
ElevationTypeDefinition elevationTypeDefinition = featureLayer.GetElevationTypeDefinition();
elevationTypeDefinition.ElevationType = LayerElevationType.OnGround;
//elevationTypeDefinition.ElevationType = LayerElevationType.RelativeToGround;
//elevationTypeDefinition.ElevationType = LayerElevationType.RelativeToScene;
//elevationTypeDefinition.ElevationType = LayerElevationType.AtAbsoluteHeight;
//..so on.
//Optional: Specify the cartographic offset
elevationTypeDefinition.CartographicOffset = 1000;
//Optional: Specify the VerticalExaggeration
elevationTypeDefinition.VerticalExaggeration = 2;
if (featureLayer.CanSetElevationTypeDefinition(elevationTypeDefinition))
featureLayer.SetElevationTypeDefinition(elevationTypeDefinition);
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.3 or higher.