Hi all,
So I have a model that selects parcels from a Feature Layer and buffers them by a user input distance...simple enough, works great. I then have another model that is driven by a script that I found on the forums here that zooms to the selected features (code below). Also works great when run as a stand alone model...it's when I try to drop this model into my main model that the map doesn't execute the zoom. Script runs fine with no errors, but doesn't actually zoom in.
My question is that, since the "Zoom model" works as a standalone (i.e. after the features are selected and held in memory and the map document refreshes after the first model has run) can I kick off the second model after a pause/redraw/etc or is there something else I should be doing here?
import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
df.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
Thanks in advance!
M