I guess I should be sipping eggnog today, but I'm getting hooked on the Python scripting...
I want to time-enable a layer (have time-enabled it in ArcMap so it is a good featureclass) in Arcpy. Does someone have a snippet of code they could share? Below is my start but it errors out on "lyrTime = lyr.Time" saying AttributeError: 'str' object has no attribute 'Time'
Jon Mulder
I want to time-enable a layer (have time-enabled it in ArcMap so it is a good featureclass) in Arcpy. Does someone have a snippet of code they could share? Below is my start but it errors out on "lyrTime = lyr.Time" saying AttributeError: 'str' object has no attribute 'Time'
Jon Mulder
Code:
LayerFileLocation = "H:\Documents\GIS\HydstraData"
LayerName = "CasedContours.lyr"
lyr = os.path.join(LayerFileLocation,LayerName)
arcpy.mapping.Layer(lyr).supports("TIME")
lyrTime = lyr.Time