Lines and polygons are not recognized by ArcPy layer.isRasterizingLayer when referencing the pathname of the map document (MXD).
上次发布: October 30, 2015ArcGIS for Desktop
漏洞 ID 编号
BUG-000090879
已提交
September 21, 2015
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
10.3.1
操作系统
Windows OS
操作系统版本
7
修正版本
10.4.0
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
ArcPy layer.isRasterizingLayer only recognizes lines and polygons when it is ran from the Python Window referencing the 'CURRENT' MXD, whereas points are recognized when referencing the path of the MXD or using the 'CURRENT' MXD. Can only use 'CURRENT' in the Python Window.
import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
layers = arcpy.mapping.ListLayers(mxd)
for layer in layers: #list(reversed(layers)):
if layer.isRasterizingLayer:
print "isRasterizing:"+layer.name