Matt_R

.shp labels continued to .kmz in "For" Loop

Discussion created by Matt_R on Jan 29, 2014
Latest reply on Jan 29, 2014 by Matt_R
Pretty new at working with python and am Stuck...I have a for Loop that looks in a folder and, based on a criteria (Homes valued over 500k), creates .kmz's with symbology for each of the .shp files in the folder. The script effectively creates the layers based on criteria and  applies symbology.  However I need help carrying the Name (fNAME) into the kmz's.  Can anyone help me complete this script?  . . . . . Indentation after the "for fc in fcs:"

Regards

Script:
~~~~~~~~~~~~~~~~~

import arcpy
from arcpy import env

# Variables
env.workspace = r"C:\Work\TEST\HOMES"
fcs = arcpy.ListFeatureClasses("D*", "Point")
HOMES_Lyr = r"C:\Work\TEST\HOMES\LAYER\HOMES.lyr"
arcpy.env.overwriteOutput=True

for fc in fcs:
fNAME = arcpy.Describe(fc).basename+"_Green"
arcpy.MakeFeatureLayer_management(fc,fNAME,"\"PRICE\" > 500000","","")   
arcpy.arcpy.ApplySymbologyFromLayer_management(fNAME,HOMES_Lyr)
arcpy.LayerToKML_conversion(fNAME, ????.kmz, "12000", "false", "DEFAULT", "1024", "96", "CLAMPED_TO_GROUND")

~~~~~~~~~~~~~

Outcomes