AnsweredAssumed Answered

Layer to KML 'Name' missing when using python

Question asked by _MarkHansen on Jul 8, 2018
Latest reply on Jul 9, 2018 by Dan_Patterson

Hi,

I'm exporting a point features to kml via a python script but the generated kml has no 'Name'  information.  i.e. when you expand the list, every point says "[no name]".  All other data is correct.

There is a 'Name' field in the attribute table.  It is the first field after the Object ID and geometry field.

 

simplified code:

arcpy.management.MakeFeatureLayer(InFc, OutLyr, None, None, None)
OutKmzPath = ProjectPath + "out.kmz"
arcpy.conversion.LayerToKML(OutLyr, OutKmzPath, 0, "NO_COMPOSITE", "DEFAULT", 1024, 96, "ABSOLUTE")

 

but, if i do the same from within ArcGIS Pro (v2.2) the generated kml has the name field correctly populated. 

 

Is there another step to get the kml Name field to populate when running in a script?

Outcomes