ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ElevationTypeDefinition Class / CartographicOffset Property
Example

In This Topic
    CartographicOffset Property (ElevationTypeDefinition)
    In This Topic
    Gets or sets the cartographic offset value.
    Syntax
    Public Property CartographicOffset As Nullable(Of Double)
    public Nullable<double> CartographicOffset {get; set;}
    Remarks
    The cartographic offset vertically adjusts the z-value of the entire layer. This raises or lowers all features in the layer by a given height. It can be applied to all LayerElevationType values.
    Example
    Set Elevation Mode for a layer
    {
        //Note: needs to be called on the MCT
        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);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.3 or higher.
    See Also