EMFFormat
Zusammenfassung
The EMFFormat object represents a collection of Enhanced Metafile format (EMF) file properties that can be configured and used with the export method on the Layout, MapFrame, and MapView objects to create an output EMF file.
Diskussion
EMF are useful for embedding in Windows documents because the vector portions of the EMF can be resized without loss of quality. However, since EMF does not support font embedding and is exclusively a Windows format, it is not commonly used as an interchange format between users.
The createExportFormat method can be used to create a EMFFormat object if the format parameter is set to EMF. The returned EMFFormat object contains all the properties associated with a generating a EMF file. These properties can be modified accordingly to produce different output results.
Eigenschaften
| Name | Erläuterung | Datentyp |
|---|---|---|
|
clipToElements (Lesen und schreiben) |
If set to |
Boolean |
|
convertMarkers (Lesen und schreiben) |
Controls whether marker symbols based on font characters are exported as font characters or as polygons. Set this option to |
Boolean |
|
filePath (Lesen und schreiben) |
A string that represents the system path and file name, including the extension, for the exported file. |
String |
|
height (Lesen und schreiben) |
The height, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
imageQuality (Lesen und schreiben) |
The amount of image resampling. The property determines the effective resolution of raster content on output. For instance, if
|
String |
|
outputAsImage (Lesen und schreiben) |
Export vector content as an image. For maps or layouts containing vector layers with a high density of vertices, this can drastically reduce the output file size. The default value is |
Boolean |
|
resolution (Lesen und schreiben) |
The effective dpi of the output vector data. The default value is 96. Hinweis:When exporting a |
Integer |
|
showSelectionSymbology (Lesen und schreiben) |
Show selected features in the map or map frame as selected in the output file. Setting this value to |
Boolean |
|
width (Lesen und schreiben) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
Methoden
setImageQuality(image_quality)
A string constant that sets the amount of image resampling.
The value determines the effective resolution of raster content on output. For instance, if the output image quality ratio is set to 1:2, an image_quality value of BETTER, and the output resolution is set to 300 dpi, the raster content is output at approximately 150 dpi. In many cases, the raster data can be included at a lower dpi than the vector data without visibly affecting quality, reducing the output file size.
| Name | Erläuterung | Datentyp |
|---|---|---|
|
image_quality |
Below is a list of valid strings.
|
String |
Codebeispiel
The following script exports a layout to EMF format using default property values.
p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts()[0]
emf = arcpy.mp.CreateExportFormat('EMF', r'C:\Temp\output.emf')
lyt.export(emf)