Arcpy - Create an Historical Marker on an archiving enabled dataset in Oracle SDE

1041
1
Jump to solution
03-09-2017 12:41 PM
MaximeDemers
Occasional Contributor III

Hi,

I am looking for a way to create an Historical Marker programmatically with arcpy v.10.3. The archiving is enabled on a dataset in Oracle SDE.

I think, it's related with arcpy Version Toolset, but I can't find the documentation about this.

First is it possible to create Historical Markers with arcpy? If yea, any tip about this would be appreciated.
Thank you,
Maxime
1 Solution

Accepted Solutions
EdwinRoa
Esri Contributor

Hi Maxime

To create a Historical Marker from Python, an option is using comTypes. Following  the next steps, you can create Historical Markers in a Enterprise Geodatabase from Python:

Environment: ArcGIS for Desktop 10.4.1 + Python 2.7

  1. Install comtypes-0.6.2.win32.exe (attached)
  2. Go to comtypes folder in "C:\Python27\ArcGIS10.4\Lib\site-packages\comtypes", and delete the automation.pyc, automation.pyo, safearray.pyc, safearray.pyo files.  Edit the file automation.py and insert POINTER(BSTR): VT_BYREF|VT_BSTR, in the _ctype_to _vartype dictionary.  
  •                          

       

   3.  Delete all files in C:\Python27\ArcGIS10.4\Lib\site-packages\comtypes\gen

   4. Copy the file Snippets.py (attached), into C:\Python27\ArcGIS10.4\Lib

   5. From Python Script you must to implement a function to create the Historical Marker.  (the example in the test.py file) 

   

   

   Hope this helps,

   Edwin

View solution in original post

1 Reply
EdwinRoa
Esri Contributor

Hi Maxime

To create a Historical Marker from Python, an option is using comTypes. Following  the next steps, you can create Historical Markers in a Enterprise Geodatabase from Python:

Environment: ArcGIS for Desktop 10.4.1 + Python 2.7

  1. Install comtypes-0.6.2.win32.exe (attached)
  2. Go to comtypes folder in "C:\Python27\ArcGIS10.4\Lib\site-packages\comtypes", and delete the automation.pyc, automation.pyo, safearray.pyc, safearray.pyo files.  Edit the file automation.py and insert POINTER(BSTR): VT_BYREF|VT_BSTR, in the _ctype_to _vartype dictionary.  
  •                          

       

   3.  Delete all files in C:\Python27\ArcGIS10.4\Lib\site-packages\comtypes\gen

   4. Copy the file Snippets.py (attached), into C:\Python27\ArcGIS10.4\Lib

   5. From Python Script you must to implement a function to create the Historical Marker.  (the example in the test.py file) 

   

   

   Hope this helps,

   Edwin