ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / MapSeries Class / FindPageNumber Method
Example

In This Topic
    FindPageNumber Method
    In This Topic
    Returns a map series page number based on the name field value of the index feature.
    Syntax
    public string FindPageNumber( 
       string pageName
    )
    Public Function FindPageNumber( _
       ByVal pageName As String _
    ) As String

    Parameters

    pageName
    Remarks
    Setting the current page requires specifying the approproriate page numnber. This helper function returns the page number associated with a page name.
    Example
    MapSeries_FindPageNumber
    //Return the page number that corresponds to the page name field for an index feature
    
    Layout layout = LayoutView.Active.Layout;
    
    //Perform on the worker thread
    await QueuedTask.Run(() =>
    {
      SpatialMapSeries SMS = layout.MapSeries as SpatialMapSeries;
      Row msRow = SMS.CurrentRow;
      System.Windows.MessageBox.Show(SMS.FindPageNumber(msRow.GetOriginalValue(msRow.FindField("NAME")).ToString()));
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also