Resumen
The DisplayOptions object is used to modify the application antialiasing mode setting.
Debate
This object is only needed if you want to modify the antialiasing mode to something other than the default value of FAST.
The CreateExportOptions function can be used to create a DisplayOptions object if the class_type parameter is set to DISPLAY. The returned object contains the property needed to configure the antialiasing mode.
Nota:
This setting is only applied when running stand-alone scripts. If you run a script in the application, this setting will be ignored and the application antialiasing mode setting will be used instead. To change the setting in the application, click the Project tab, click Options, click Display, and set the Antialiasing mode value.
Propiedades
Propiedad | Explicación | Tipo de datos |
antialiasing (Lectura y escritura) | A string constant that represents how jagged edges may appear in an export. The amount of smoothing depends on the speed you set. The default value is FAST.
| String |
Descripción general del método
Método | Explicación |
setAntialiasing (antialiasing) | The setAntialiasing method is used to set the antialiasing mode for script that are run outside of the application. |
Métodos
setAntialiasing (antialiasing)
Parámetro | Explicación | Tipo de datos |
antialiasing |
(El valor predeterminado es FAST) | String |
Muestra de código
The following script exports a Layout object using default PDFFormat properties but configures DisplayOptions to set antialiasing to BEST.
import arcpy
p = arcpy.mp.ArcGISProject(r'C:\Projects\YosemiteNP\Yosemite.aprx')
lyt = p.listLayouts('Main Attractions')[0]
pdf = arcpy.mp.CreateExportFormat('PDF')
pdf.filePath = r'C:\Projects\YosemiteNP\YosemiteMainAttractions.pdf'
disOpt = arcpy.mp.CreateExportOptions('DISPLAY')
disOpt.setAntialiasing('BEST')
lyt.export(pdf, disOpt)