I have a simple model that I've built in model builder and I would like to be able to run in it as a standalone script. I think the issue is that the script doesn't know where to find the layer from the mxd file, but I don't know the syntax to tell it where to find it. Can someone take a look and help please?
# Import arcpy module
import arcpy
# Local variables:
oms_span = "Blink Outages\\oms_span"
oms_span__2_ = oms_span
test_kmz = "F:\\test\\Project\\test.kmz"
# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(oms_span, "NEW_SELECTION", "gs_outg_cd = 31 OR gs_outg_cd = 32 OR gs_outg_cd = 35")
# Process: Layer To KML
arcpy.LayerToKML_conversion(oms_span__2_, test_kmz, "0", "NO_COMPOSITE", "DEFAULT", "1024", "96", "CLAMPED_TO_GROUND")