Modify an existing map series
//Modify the currently active map series and changes its sort field and page number field.
//Perform on the worker thread
await QueuedTask.Run(() =>
{
SpatialMapSeries SMS = layout.MapSeries as SpatialMapSeries; //cast as spatial map series for additional members
SMS.SortField = "State_Name";
SMS.SortAscending = true;
SMS.PageNumberField = "PageNum";
//Overwrite the current map series with these new settings
layout.SetMapSeries(SMS);
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.