Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a shapefile which I am loading to a DB using Model developed under MyToolbox.

At the same time, I would like to publish this as a Map Service in ArcGIS Server.

Is there any way to create .sddraft / .sd from the shapefile or feature class from the DB using ModelBuilder so that I can club these two and make it as single python script by exporting the model?

I am using ArcGIS 10.2 Desktop and 10.1 Server.

share|improve this question

Instead of writing a model in ModelBuilder, and exporting it as a Python script, I think you should instead:

  • run the two tools from their tool dialogs
  • use the Geoprocessing | Results window to Copy As Python Snippet their code into a Python script.

I find that this is an easier way to learn ArcPy than the way that you are trying.

share|improve this answer

You can use CreateMapSDDraft (arcpy.mapping) or Upload Service Definition (Server)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.