ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for 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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

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

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.

  • PRIVATE —Only the owner or the geodatabase administrator may view the version and modify versioned data or the version itself.
  • PUBLIC —Any 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.
  • PROTECTED —Any 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

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

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

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal