Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I check whether or not a feature class is versioned using python? I'm trying to register feature classes using a python script. Before I do this I need to check whether a feature class is versioned. Are there keywords that we can use in coding while looping through the feature classes? Thanks in advance for the help.

share|improve this question
up vote 11 down vote accepted

If you call the method arcpy.Describe() on your feature class - e.g. arcpy.Describe("path/to/my/feature/class"), you will get a Dataset properties object. You can then use the isVersioned property of this object to get a boolean, whether or not your dataset is versioned.

Code snippet:

import arcpy
datasetVersioned = arcpy.Describe("path/to/my/feature/class").isVersioned

Remember to use escaped backslash characters, forward slashes, or a raw string in the path

More details in the docs:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.