Create Version (Data Management)

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 ArcSDE geodatabase that contains the parent version and will contain the new version. The default is to use the workspace defined in the environment settings.

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.

String

Code Sample

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

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

# Import system modules
import arcpy

# Set local variables
inWorkspace = "Database Connections/ninefour@gdb.sde"
parentVersion = "dbo.DEFAULT"
versionName = "myVersion"

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

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Yes
ArcInfo: Yes

10/27/2014