ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GridOptionsEnvironment Class / DefaultGridOptions Property
Example

In This Topic
    DefaultGridOptions Property (GridOptionsEnvironment)
    In This Topic
    Gets a set of default grid options
    Syntax
    Public ReadOnly Property DefaultGridOptions As GridOptions
    public GridOptions DefaultGridOptions {get;}
    Remarks
    These can be modified as needed and applied to a map. See SetGridOptions
    Example
    Get the Default Grid Options
    {
        QueuedTask.Run(() =>
        {
            var gridOptions = GridOptionsEnvironment.Instance.DefaultGridOptions;
        });
    }
    Reset the Grid Options for a Map back to Defaults
    {
        QueuedTask.Run(() =>
        {
            if (GridOptionsEnvironment.Instance.HasGridOptions(map))
            {
                //set back to defaults - will overwrite existing
                GridOptionsEnvironment.Instance.SetGridOptions(map, 
                    GridOptionsEnvironment.Instance.DefaultGridOptions);
            }
        });
    }
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also