Hello,
I have written a python script to create a map service. The bulk of the script is three commands basically to verify the map document, create a service definition file, and then publish. The script works fine, except that it does not set the capabilities. For example, in one service, I would like to turn off KML, and turn on Network Analyst. I searched but could not find out how to do this. Here is the code:
analysis = arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'ARCGIS_SERVER', con, True, None, summary, tags)
result = arcpy.StageService_server(sddraft, sd)
result = arcpy.UploadServiceDefinition_server(sd, con)
Thanks,
Gregg
I have written a python script to create a map service. The bulk of the script is three commands basically to verify the map document, create a service definition file, and then publish. The script works fine, except that it does not set the capabilities. For example, in one service, I would like to turn off KML, and turn on Network Analyst. I searched but could not find out how to do this. Here is the code:
analysis = arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'ARCGIS_SERVER', con, True, None, summary, tags)
result = arcpy.StageService_server(sddraft, sd)
result = arcpy.UploadServiceDefinition_server(sd, con)
Thanks,
Gregg