Select to view content in your preferred language

How to select version from SDE version list in Arcpy (python)

1093
2
03-15-2019 07:49 AM
MuhammadAttique
Regular Contributor

Hi, 

I already develop python script , for .gdb it’s fine, ArcGIS 10.2.1 in use.

now my task to connect to ArcGIS Server then get all available version list on SDE.default.  Select the version and do the analysis.

can anyone help me how to get this.

I try to find Getparameterastext() but no version list parameters there.

any idea ...

thanks

Tags (1)
0 Kudos
2 Replies
MarisaClaggett
Frequent Contributor

Hi Muhammad,

Are you able to share the script you currently have?

Thanks,

Marisa

0 Kudos
JoleneGiess1
Esri Contributor

Hi Muhammad, 

You could try the arcpy.ListVersions(database) tool to get a list of versions the connected user has permissions to use. 

You could then use the ChangeVersion_management (in_features, version_type, {version_name}, {date}) to change to the version you would like to use. 

More information about these tools can found at the links below:

ListVersions—Help | ArcGIS Desktop 

Change Version—Help | ArcGIS for Desktop