MapSeriesExportOptions

Synthèse

The MapSeriesExportOptions object represents a collection of optional properties that can be used with the export method on the MapSeries and BookmarkMapSeries objects to configure how a map series is exported.

Discussion

This object is only needed if you want to export a MapSeries or BookmarkMapSeries with properties different than its default values.

The CreateExportOptions function can be used to create a MapSeriesExportOptions object if the class_type parameter is set to MAPSERIES. The returned object contains all the properties needed to configure how map series are exported.

Remarque :

Currently map series objects can only be exported to PDF.

Propriétés

PropriétéExplicationType de données
customPages
(Lecture et écriture)

A string that identifies the map series pages to be exported if the exportPages property is set to CUSTOM. For example, the following string would export 5 pages: 1, 3, 5-7. The default value is an empty string.

String
exportFileOptions
(Lecture seule)

A string constant that represents how the pages will be exported. To change this value, use the setFileExportOptions method. The default value is PDF_SINGLE_FILE.

  • PDF_MULTIPLE_FILES_PAGE_NAMEExport each map series page to an individual file and append the page name to the file name. For example, Output.PDF will become Output_LakeErie.PDF.
  • PDF_MULTIPLE_FILES_PAGE_NUMBERExport each map series page to an individual file and append the page number to the file name. For example, Output.PDF will become Output_1.PDF.
  • PDF_SINGLE_FILEExport all pages into a multipage, single file document.
String
exportPages
(Lecture seule)

A string constant that represents the collection of map series pages to be exported. To change this value, use the setExportPages method. The default value is ALL.

  • ALL Export all pages in the map series.
  • CURRENT Export the currently active page. This option only applies when running a script inside the application.
  • CUSTOMExport a custom set of pages that is defined using the customPages property.
  • SELECTED_INDEX_FEATURESOnly export map series pages that correspond to the selected index features associated with the map series.
String
showExportCount
(Lecture et écriture)

If set to True, you will see the status of each page being exported displayed in the Python shell. The default value is False.

Boolean

Vue d’ensemble des méthodes

MéthodeExplication
setExportFileOptions (export_file_options)

A string constant that represents how the pages will be exported.

setExportPages (export_pages)

A string constant that represents the collection of map series pages to be exported.

Méthodes

setExportFileOptions (export_file_options)
ParamètreExplicationType de données
export_file_options
  • PDF_MULTIPLE_FILES_PAGE_NAMEExport each map series page to an individual file and append the page name to the file name. For example, Output.PDF will become Output_LakeErie.PDF.
  • PDF_MULTIPLE_FILES_PAGE_NUMBERExport each map series page to an individual file and append the page number to the file name. For example, Output.PDF will become Output_1.PDF.
  • PDF_SINGLE_FILEExport all pages into a multipage, single file document.
String
setExportPages (export_pages)
ParamètreExplicationType de données
export_pages
  • ALL Export all pages in the map series.
  • CURRENT Export the currently active page. This option only applies when running a script inside the application.
  • CUSTOMExport a custom set of pages that is defined using the customPages property.
  • SELECTED_INDEX_FEATURESOnly export map series pages that correspond to the selected index features associated with the map series.
String

Exemple de code

MapSeriesExportOptions example

The following script exports a MapSeries object using default PDFFormat properties but configures the MapSeriesExportOptions to export a custom set of map series pages.

p = arcpy.mp.ArcGISProject('current')
l = p.listLayouts('Layout_MS')[0]
ms = l.mapSeries

pdf = arcpy.mp.CreateExportFormat('PDF', r'c:\temp\MS_PDF.pdf')

msExOpt = arcpy.mp.CreateExportOptions('MAPSERIES')
msExOpt.setExportPages('CUSTOM')
msExOpt.customPages = '1-3'

ms.export(pdf, msExOpt)