Saturday, 14 April 2018

Creating Python script to reconcile/post geodatabase versions?


I’m trying to set up a python script so that I can schedule our rec/post to run on a server. I’ve created a model with the Reconcile Version tool, with the option to Post checked on. I then export this to a Python script. I run the script, and it finishes without any errors, but I do not see that my edits are posted to the default version. Is it not possible to script this tool, or is there a switch that I’m missing?



I’m using ArcSDE 9.3.1.



Answer



You should be able too. Below is the help for the tool, and how I've implemented it before:


http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1991&pid=1986&topicname=Reconcile_Version_(Data_Management)


is ESRI's help for the gp tool for that functionality. Try:


gp.reconcileversion_management(inworkspace, versionname, "DEFAULT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "NO_LOCK_ACQUIRED", "ABORT_CONFLICTS", "POST")

is the way I've used it. However I've had issues running python on our server so I ported the process over to a full arcobjects desktop app that seems to run fairly well.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...