サマリー
The DisplayOptions object is used to modify the application antialiasing mode setting.
説明
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.
注意:
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.
プロパティ
プロパティ | 説明 | データ タイプ |
antialiasing (読み書き) | 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 |
方法の概要
方法 | 説明 |
setAntialiasing (antialiasing) | The setAntialiasing method is used to set the antialiasing mode for script that are run outside of the application. |
方法
setAntialiasing (antialiasing)
パラメーター | 説明 | データ タイプ |
antialiasing |
(デフォルト値は次のとおりです FAST) | String |
コードのサンプル
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)