How can I use arcpy to add map service URL to my Table of content in ArcMap

2330
3
03-23-2016 12:30 AM
monrathpumkhem
New Contributor II

I would like to create the model or script to inser the URL of Map service and then it will make the layer on my table of content. It is like a  "Make image server layer" toolbox. But different service type

Thank you for advance,

0 Kudos
3 Replies
NeilAyres
MVP Alum

Well, the normal way to do it is to create a GIS Server connection via ArcCatalog.

Then in ArcMap you can navigate to that connection and add any service just like a normal layer / dataset.

But as you are posting this in "Developers", I guess you want some sort of programmatic solution.

0 Kudos
monrathpumkhem
New Contributor II

May I change the question to >>  How can I save the map service as layer file (lyr) because I found this ArcGIS 10 user python arcpy to add a WMS Service and It's work

0 Kudos
NeilAyres
MVP Alum

But, once you have the service layer in ArcMap, just right click on it to "save as *.lyr file"....

0 Kudos