Summary
The DisplayOptions object is used to modify the application antialiasing mode setting.
Discussion
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.
Note:
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.
Properties
Property | Explanation | Data Type |
antialiasing (Read and Write) | 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 |
Method Overview
Method | Explanation |
setAntialiasing (antialiasing) | The setAntialiasing method is used to set the antialiasing mode for script that are run outside of the application. |
Methods
setAntialiasing (antialiasing)
Parameter | Explanation | Data Type |
antialiasing |
(The default value is FAST) | String |
Code sample
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)