Select to view content in your preferred language

Provide "Copy Python Command" for Share As/Overwrite Web Layer

198
2
3 weeks ago
Status: Closed
Labels (1)
PeterKnoop
MVP Regular Contributor

The ability to "Copy Python Command" for a geoprocessing tool, from the tool dialog or the history is very handy when building a Python Notebook or script for automation. It would be great to be able to do that for when you select "Share As Web Layer" or "Overwrite Web Layer" as well. 

Figuring out the correct Python to accomplish those two tasks is notoriously challenging. Being able to fill out those dialogs, and then copy the resulting chain of ArcGIS python methods (e.g., FeatureSharingDraft, StageService, Upload Service Definition, etc.), would be a great help!

2 Comments
RichardHowe

As somebody who has gone through the same process then I agree @PeterKnoop 

In fact I would go as far as to say having it all packaged as a single arcpy command would be extremely useful. I appreciate it blurs the lines between arcpy and the ArcGIS API, but it;s a very common operation and being able to call it in a single line would be so much easier

JonahLay
Status changed to: Closed

Thank you for submitting this idea. However, supporting this functionality is not possible since Share As Web Layer or Overwrite Web Layer are not GP tools.

With this being said, you can create your own custom tool by following the steps in this blog article. The article includes a project package containing a sample model and script tools.