Can you "Create Local Copy for Editing" & "Synchronize Local Edits with Server" using Python?

516
6
09-02-2018 07:06 PM
LindsayRaabe_FPCWA
Occasional Contributor III

Is it possible to access the "Create Local Copy for Editing" and "Synchronize Local Edits with Server" functions using python? I have a tool that transfers data from one AGO layer to another but has manual steps requiring the user to download local copies of both layers, run the tool and then synchronize both layers again. 

Making a local copy of a feature service for editing—Help | ArcGIS for Desktop 

I would like to be able to automate the download/upload part of the process too as it happens at a set extent each time so is predictable. Is this possible? I can't see anything from my Googling and searching of GeoNet. 

The GIS guy (not the IT guy)
0 Kudos
6 Replies
DanPatterson_Retired
MVP Esteemed Contributor

When you are talking 'python' and arcmap or ArcGIS pro, you are generally referring to using what is contained in the arcpy module and/or running tools from within ArcToolbox.

The easiest way is to explore

Anatomy of a tool reference page—ArcGIS Help | ArcGIS Desktop  and

ArcGIS Pro Python Reference—ArcGIS Pro | ArcGIS Desktop 

These are Pro references, but ArcMap has equivalents.

If there are not equivalent 'tools' or arcpy access points you may have to look towards other implementation methods.

0 Kudos
LindsayRaabe_FPCWA
Occasional Contributor III

Looks like the short answer is not really. It appears to not be a tool that's available in the Toolbox but rather a menu item, so no anatomy to examine. Might have to send this one to an ESRI contact. 

The GIS guy (not the IT guy)
0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

arcobjects perhaps

0 Kudos
FarhadKazemi
New Contributor

Lindsay,

Have you find a way to automate creating and syncing  the local copy? What response did you get from ESRI? I need to automate this process with python and appreciate any leads.

Thanks,

Farhad

0 Kudos
LindsayRaabe_FPCWA
Occasional Contributor III

Sorry for the delayed response. Nope, I didn't really find a solution in ArcMap. I'm really trying to avoid ArcMap now and instead using ArcGIS Pro for anything related to AGOL editing. No downloading or synchronizing required so works much better with Model Builder and arcpy. 

The GIS guy (not the IT guy)
0 Kudos
FarhadKazemi
New Contributor

Thank you for your reply. I am using ArcGIS pro (python 3.7) to interface with AGOL, as well.

0 Kudos