ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Version

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a new version in the specified geodatabase.

Usage

  • The output version name is prefixed by the geodatabase user name—for example, SDE.arctoolbox.

  • The output version's permissions are set to private by default but can be changed using the Alter Version tool.

  • Personal and file geodatabases do not support versioning. Versioning tools only work with enterprise geodatabases.

  • Versions are not affected by changes occurring in other versions of the database.

  • A version's permission can only be changed by its owner (the user who created it).

Syntax

arcpy.management.CreateVersion(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.

  • PRIVATE —Only the owner or the geodatabase administrator can view and modify the version or versioned data.
  • PUBLIC —Any user can view the version. Any user who has been granted read/write (update, insert, and delete) permissions on datasets can modify datasets in the version.
  • PROTECTED —Any user can view the version, but only the owner or the geodatabase administrator can edit the version or datasets in the version.
String

Derived Output

NameExplanationData Type
out_workspace

The updated input workspace.

Workspace

Code sample

CreateVersion example (stand-alone script)

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

# 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

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Versions toolset
  • An overview of traditional versioning
  • The version editing process
  • A quick tour of reviewing conflicts
  • What is a version?
  • Version scenarios

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal