ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GridOptionsEnvironment Class / RemoveGridOptions Method
Example

In This Topic
    RemoveGridOptions Method (GridOptionsEnvironment)
    In This Topic
    Removes the grid options for the specified map. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub RemoveGridOptions( _
       ByVal map As Map _
    ) 
    public void RemoveGridOptions( 
       Map map
    )

    Parameters

    map
    Exceptions
    ExceptionDescription
    map cannot be null
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If no options exist, this method is a no-op
    Example
    Remove the Grid Options from a Map
    {
        QueuedTask.Run(() =>
        {
            if (GridOptionsEnvironment.Instance.HasGridOptions(map))
                GridOptionsEnvironment.Instance.RemoveGridOptions(map);
        });
    }
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also