AnsweredAssumed Answered

LayerToKML_conversion won't convert entire layer

Question asked by aliceell on Jan 18, 2019
Latest reply on Jan 18, 2019 by aliceell

I'm trying to convert a vector layer to a KML file.

Here's what the layer looks like in ArcMap-- as you can see, it has multiple polygons:

enter image description here

Here's my code:

import arcpy
arcpy.env.workspace = r'C:\\username\\folder'
mxd = arcpy.mapping.MapDocument(r"PreHex272.mxd")
lyr = arcpy.mapping.ListLayers(mxd)[0]
arcpy.LayerToKML_conversion(lyr, "kml_tests.kmz")

But it only outputs one small polygon in Google Earth:

enter image description here

I do not have any polygons selected. In fact, I tried selecting a different polygon and got the same result. I tried selecting all polygons and got the same result. I also tried restarting Google Earth, with no luck.


I'm using ArcGIS Desktop 10.6.1 on Windows 7.


Thanks in advance!


(Hopefully this is the right place to post-- I'm still getting used to picking which GeoNet "community" to post in. Sorry if this is not the correct location.)