Hope you are keeping safe in current events.
Im trying to Save new mosaic dataset with new definition query. But it seems that the script below saves new mosaic dataset, but without a query. Any advise would be appreciated.
mxd = arcpy.mapping.MapDocument(\Historic_Maps.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")
field = 'Date'
values = "'1950'"
query=str(field) +" "+ "=" + str(values)
for lyr in arcpy.mapping.ListLayers(mxd, "*"):
if lyr.name == "Sacle_1250":
lyr.definitionQuery = query
arcpy.mapping.AddLayer(df, lyr, "BOTTOM")