摘要
Exports a map document to either PDF, Production PDF, or a map package.
用法
When using MAP_PACKAGE as the export type, all the layers in the TOC must be sourced, and the map document properties must be filled out. For more requirements to export as a map package, see Package Map.
The PDF Setting File parameter is only used for exporting to Production PDF. The setting files installed can be found at <Installion Location>\ArcGIS\Desktop10.3.1\Styles.
语法
ExportMapDocument_defense (Input_Map_Document, Export_Type, {PDF_Setting_File})
参数 | 说明 | 数据类型 |
Input_Map_Document | The path to the map document. | ArcMap Document |
Export_Type | Defines the type of export.
| String |
PDF_Setting_File (可选) | A PDF settings file. The XML files are installed in <Installation path>ArcGIS\\Desktop10.3.1\Styles. | File |
代码示例
Export Map Document example (Python window)
The following code sample demonstrates how to execute ExportMapDocument.
from arcpy import defense,CheckOutExtension,CheckInExtension
# Checking out Defense Mapping extension
CheckOutExtension('defense')
# Setting variables used in the tool
mapDocument=r'C:\Testing\V795X16573.mxd'
exportType="PRODUCTION_PDF"
pdfSettingsXML=r'C:\Program Files (x86)\ArcGIS\Desktop10.3\Styles\MGCP_Production_PDF.xml'
# Calling Export Map Document tool
defense.ExportMapDocument(mapDocument,exportType,pdfSettingsXML)
# Checking in Defense Mapping extension
CheckInExtension('defense')
环境
许可信息
- ArcGIS Desktop Basic: 否
- ArcGIS Desktop Standard: 需要 Defense Mapping
- ArcGIS Desktop Advanced: 需要 Defense Mapping