I've got a working model in ArcMap that selects features in a layer that are within a desired distance from a user-entered point, then zooms to the selection. This model will not let me publish it due to an error (see attached images/files). What needs to be fixed here? And why does it work perfectly in ArcMap, but won't allow to be published?
don't use gp services, but there are two links
perhaps there is an example there. 'Current' is the reference to an arcmap project which means that you have to have a project open and running for the mapping module to operate in that environment.
Ok, next question, how do I make the (web) map refresh after I make a selection, so I can actually see the results (this is the part that required the try with python code).
you will have to expand the error and warning and correct the mistakes using the process in the help. They give a select by attribute and location example, without the zoom... just keep checking around in that help section to see if it is possible and whether you have provided the necessary information
The problem seems to be related to passing 'CURRENT' argument. This would work in ArcMap wouldn't be recognized in a gp service. May be you should specify the path to the map document instead.
mxd = arcpy.mapping.MapDocument(r"c:\Temp\MXD")
This did not help either. This is beginner stuff here, and i feel like the worlds biggest idiot for not having it work. I can't even follow the help examples that I keep seeing over and over again (as listed above) because ArcMap won even let me add a service to an mxd (for example).
I must be missing something fundamental to GP services, because I just can't understand why this stuff isn't working. Have you looked at my model and script?