I 'm new in Python script and i want to export shapefiles in the folder as the kml file with define layer files. for single shapefile it work perfectly refer below script. But I want to export 4 different shapefiles in the folder as kml with define symbology. Can any one help me?
import arcpyfrom arcpy import env#set the current workspaceenv.workspace = r"C:\Work\20141118_Addresses\MGA"#Set layer to apply symbology toInputLayer1 = r"C:\Work\20141118_Addresses\MGA\Address_project.shp"#Set layer that output symbology will be based onsymbologyLayer1=r"C:\Work\20141118_Addresses\Layer\Address.lyr"#Set Output Kmz files atOutWorkspace1 = r"C:\Work\20141118_Addresses\Output\Address.kmz"#Apply the symbology from the symbology layer to the Address layerarcpy.MakeFeatureLayer_management(InputLayer1,"Address_layer")arcpy.ApplySymbologyFromLayer_management("Address_layer",symbologyLayer1)arcpy.LayerToKML_conversion("Address_layer",OutWorkspace1,"12000","false","DEFAULT","1024","96","CLAMPED_TO_GROUND")
أكثر...
import arcpyfrom arcpy import env#set the current workspaceenv.workspace = r"C:\Work\20141118_Addresses\MGA"#Set layer to apply symbology toInputLayer1 = r"C:\Work\20141118_Addresses\MGA\Address_project.shp"#Set layer that output symbology will be based onsymbologyLayer1=r"C:\Work\20141118_Addresses\Layer\Address.lyr"#Set Output Kmz files atOutWorkspace1 = r"C:\Work\20141118_Addresses\Output\Address.kmz"#Apply the symbology from the symbology layer to the Address layerarcpy.MakeFeatureLayer_management(InputLayer1,"Address_layer")arcpy.ApplySymbologyFromLayer_management("Address_layer",symbologyLayer1)arcpy.LayerToKML_conversion("Address_layer",OutWorkspace1,"12000","false","DEFAULT","1024","96","CLAMPED_TO_GROUND")
أكثر...