ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IGridOptionsEnvironment Interface / GetGridOptions Method / GetGridOptions(Map,Boolean) Method
The input map
Set to true to create a new grid options if one does not already exist

In This Topic
    GetGridOptions(Map,Boolean) Method
    In This Topic
    Get the grid options for the given map. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Overloads Function GetGridOptions( _
       ByVal map As Map, _
       ByVal add As Boolean _
    ) As GridOptions
    GridOptions GetGridOptions( 
       Map map,
       bool add
    )

    Parameters

    map
    The input map
    add
    Set to true to create a new grid options if one does not already exist

    Return Value

    The grid options
    Exceptions
    ExceptionDescription
    map cannot be null
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If 'add = true' (default) a new grid options will be created if a reference grid does not currently exist for the map otherwise null will be returned if the map has no reference grid options set as currently
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also