Create Version (Data Management)

License Level:BasicStandardAdvanced

Summary

Creates a new version in the specified geodatabase.

Usage

Syntax

CreateVersion_management (in_workspace, parent_version, version_name, {access_permission})
ParameterExplanationData Type
in_workspace

The enterprise geodatabase that contains the parent version and will contain the new version.

Workspace
parent_version

The geodatabase, or version of a geodatabase, on which the new version will be based.

String
version_name

The name of the version to be created.

String
access_permission
(Optional)

The permission access level for the version to protect it from being edited or viewed by users other than the owner.

  • PRIVATEOnly the owner or the geodatabase administrator may view the version and modify versioned data or the version itself.
  • PUBLICAny user may view the version. Any user who has been granted read/write (update, insert, and delete) permissions on datasets can modify datasets in the version.
  • PROTECTEDAny user may view the version, but only the owner or the geodatabase administrator may edit datasets in the version or the version itself.
String

Code Sample

The following stand-alone script demonstrates how to create a new version.

# Name: CreateVersion_Example.py
# Description: Creates a new version

# Import system modules
import arcpy

# Set local variables
inWorkspace = "c:/Connections/whistler@gdb.sde"
parentVersion = "dbo.DEFAULT"
versionName = "myVersion"

# Execute CreateVersion
arcpy.CreateVersion_management(inWorkspace, parentVersion, versionName, "PUBLIC")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015