Package Project (Data Management)

Summary

Consolidates and packages an ArcGIS Pro project (.aprx) and its contents (maps and data) to a packaged project file (.ppkx).

Usage

  • The data and elements in the project will be consolidated into the project package (.ppkx), including maps and 3D views, the data and layers in the maps, toolboxes, geoprocessing history items, styles, layouts, and folders or connections (server, workflow, and so on) when appropriate.

  • The Share outside of organization parameter allows you to control whether a package will be created for internal (inside your organizations network) or external use. When Share outside of organization is checked, enterprise geodatabase layers, feature services, and data referenced across network shares (UNC path) will be copied (or converted) and included in the project package. Data stored on the local machine will also be consolidated and packaged.

    Note:

    Creating an internal package that contains referenced data will open with broken links if shared to colleagues who do not have access to networked resources (enterprise geodatabase, feature service, and data referenced through disk shares [UNC paths]).

  • Templates can be created using the Package as template parameter. You can use a project template (.aptx file) to create a project by defining layers, maps, and data, as well as required connections.

    Learn more about creating a project template

  • Use the Analyze Tools for Pro and Analyze Toolbox for Version tools to analyze toolboxes that are part of a project before the consolidation process is performed. Identified errors can stop the consolidation process. Fix the errors or remove the tool from the project. Toolboxes can be excluded from the output project package by unchecking the Include Toolboxes parameter.

  • Similar to project toolboxes, geoprocessing history (the result information from running a geoprocessing tool) will be included in the package. Data that is required to process the history item will be included in the output package regardless of whether it is in a map or scene. Any history items that are invalid (failed during processing) or where data cannot be found will cause the packaging process to stop. You must remove or fix the history item in question. History items can be excluded from a project package by unchecking the Include History Items parameter.

  • Connections—such as folder, server, database, and workflow—will only be included in an internal package. These items will be removed if the package is created with the Share outside of organization parameter checked.

  • For feature layers, use the Extent parameter to select the features that will be consolidated. For raster layers, use the Extent parameter to clip the raster datasets.

  • Additional files can be included in the package. Images, PDFs, Word documents, and .zip files can be included in the package using the Additional Files parameter.

  • Caution:

    Project packages (.ppkx files) can only be created and opened with ArcGIS Pro.

Parameters

LabelExplanationData Type
Input Project

The project (.aprx file) that will be packaged.

File
Output File

The output project package (.ppkx file).

File
Share outside of organization
(Optional)

Specifies whether the project and all data will be consolidated, converted, or copied into the package (for sharing outside your organization) or referenced as is without converting or including them in the package (for sharing within your organization).

Note:

Data and maps will be consolidated and packaged if the project references them from a local path, such as c:\gisdata\landrecords.gdb\, regardless of this parameter's setting.

  • Unchecked—Data stored on networked resources such as enterprise geodatabases, feature services, and file shares (UNC path) will be referenced as is without converting them or including them in the package. This is the default.
  • Checked—Data stored on networked resources will be consolidated, converted, or copied into the package. The data's formats will be preserved when possible.
Boolean
Package as template
(Optional)

Specifies whether a project template or a project package will be created. Project templates can include maps, layouts, connections to databases and servers, and so on. A project template can be used to standardize a series of maps for different projects and to ensure that the correct layers are immediately available for everyone to use in their maps.

  • Unchecked—A project package will be created. This is the default.
  • Checked—A project template will be created.

Boolean
Extent
(Optional)

Specifies the extent that will be used to select or clip features.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Intersection of Inputs Intersect—The extent will be the intersecting extent of all inputs.
  • Union of Inputs Union—The extent will be the combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.

When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates.

Extent
Apply Extent only to enterprise geodatabase layers
(Optional)

Specifies whether the specified extent will be applied to all layers or to enterprise geodatabase layers only.

  • Unchecked—The extent will be applied to all layers. This is the default.
  • Checked—The extent will be applied to enterprise geodatabase layers only.

Boolean
Additional Files
(Optional)

Additional files that will be included in the package.

File
Summary
(Optional)

The summary information that will be added to the properties of the package.

String
Tags
(Optional)

The tags that will be added to the properties of the package. Separate multiple tags with a comma or semicolon.

String
Package Version
(Optional)

Specifies the ArcGIS Pro version that certain objects such as projects, maps, and layers will be compatible with and persisted to. Saving to an earlier version can be helpful if the project will be used with older software.

Caution:

A package saved to an earlier version may lose functionality or properties that are unsupported in the earlier version.

  • All versions The contents of the package will be compatible with all versions (ArcGIS Pro 2.1 and later).
  • Current version The contents of the package will be compatible with the current version of the ArcGIS Pro release.
  • ArcGIS Pro 2.2 The contents of the package will be compatible with ArcGIS Pro version 2.2.
  • ArcGIS Pro 2.3The contents of the package will be compatible with ArcGIS Pro version 2.3.
  • ArcGIS Pro 2.4The contents of the package will be compatible with ArcGIS Pro version 2.4.
  • ArcGIS Pro 2.5The contents of the package will be compatible with ArcGIS Pro version 2.5.
  • ArcGIS Pro 2.6The contents of the package will be compatible with ArcGIS Pro version 2.6.
  • ArcGIS Pro 2.7The contents of the package will be compatible with ArcGIS Pro version 2.7.
  • ArcGIS Pro 2.8The contents of the package will be compatible with ArcGIS Pro version 2.8.
  • ArcGIS Pro 2.9The contents of the package will be compatible with ArcGIS Pro version 2.9.
  • ArcGIS Pro 3.0The contents of the package will be compatible with ArcGIS Pro version 3.0.
  • ArcGIS Pro 3.1The contents of the package will be compatible with ArcGIS Pro version 3.1.
  • ArcGIS Pro 3.2The contents of the package will be compatible with ArcGIS Pro version 3.2.
  • ArcGIS Pro 3.3The contents of the package will be compatible with ArcGIS Pro version 3.3.
  • ArcGIS Pro 3.4The contents of the package will be compatible with ArcGIS Pro version 3.4.
String
Include Toolboxes
(Optional)

Specifies whether project toolboxes, and the data referenced by the tools in those toolboxes, will be consolidated and included in the output package. All projects require a default toolbox, which will be included in the output package regardless of this setting. A toolbox in a connected folder is not considered a project toolbox and is not impacted by this setting.

  • Checked—Project toolboxes will be included in the output package. This is the default.
  • Unchecked—Project toolboxes will not be included in the output package.
Boolean
Include History Items
(Optional)

Specifies whether geoprocessing history items will be consolidated and included in the output package. Included history items will consolidate the data required to reprocess the history item.

  • History items will be includedHistory items will be included in the output package. This is the default.
  • History items will not be includedHistory items will not be included in the output package.
  • Only valid history items will be includedOnly valid history items will be included in the output package. History items are invalid if any of the original input layers or tools cannot be found.
String
Read Only Package
(Optional)

Specifies whether the project will be read-only. Read-only projects cannot be modified or saved.

  • Checked—The project will be read-only.
  • Unchecked—The project will be writable. This is the default.
Boolean
Keep only the rows which are related to features within the extent
(Optional)

Specifies whether the specified extent will be applied to related data sources.

  • Unchecked—Related data sources will be consolidated in their entirety. This is the default.
  • Checked—Only related data corresponding to records within the specified extent will be consolidated.
Boolean
Preserve Mobile Geodatabase
(Optional)

Specifies whether input mobile geodatabase data will be preserved in the output or written to file geodatabase format. If the input data is a mobile geodatabase network dataset, the output will be a mobile geodatabase.

  • Unchecked—Mobile geodatabase data will be converted to file geodatabase format. This is the default.
  • Checked—Mobile geodatabase data will be preserved as mobile geodatabase data in the output. The geodatabase will be included in its entirety.
Boolean

arcpy.management.PackageProject(in_project, output_file, {sharing_internal}, {package_as_template}, {extent}, {apply_extent_to_arcsde}, {additional_files}, {summary}, {tags}, {version}, {include_toolboxes}, {include_history_items}, {read_only}, {select_related_rows}, {preserve_sqlite})
NameExplanationData Type
in_project

The project (.aprx file) that will be packaged.

File
output_file

The output project package (.ppkx file).

File
sharing_internal
(Optional)

Specifies whether the project and all data will be consolidated, converted, or copied into the package (for sharing outside your organization) or referenced as is without converting or including them in the package (for sharing within your organization).

  • INTERNAL Data stored on networked resources such as enterprise geodatabases, feature services, and file shares (UNC path) will be referenced as is without converting them or including them in the package. This is the default.
  • EXTERNALData stored on networked resources will be consolidated, converted, or copied into the package. The data's formats will be preserved when possible.
Boolean
package_as_template
(Optional)

Specifies whether a project template or a project package will be created. Project templates can include maps, layouts, connections to databases and servers, and so on. A project template can be used to standardize a series of maps for different projects and to ensure that the correct layers are immediately available for everyone to use in their maps.

Learn more about creating a project template

  • PROJECT_PACKAGE A project package will be created. This is the default.
  • PROJECT_TEMPLATEA project template will be created
Boolean
extent
(Optional)

Specifies the extent that will be used to select or clip features.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
apply_extent_to_arcsde
(Optional)

Specifies whether the specified extent will be applied to all layers or to enterprise geodatabase layers only.

  • ALL The specified extent will be applied to all layers. This is the default.
  • ENTERPRISE_ONLYThe specified extent will be applied to enterprise geodatabase layers only.
Boolean
additional_files
[additional_files,...]
(Optional)

Additional files that will be included in the package.

File
summary
(Optional)

The summary information that will be added to the properties of the package.

String
tags
(Optional)

The tags that will be added to the properties of the package. Separate multiple tags with a comma or semicolon.

String
version
[version,...]
(Optional)

Specifies the ArcGIS Pro version that certain objects such as projects, maps, and layers will be compatible with and persisted to. Saving to an earlier version can be helpful if the project will be used with older software.

Caution:

A package saved to an earlier version may lose functionality or properties that are unsupported in the earlier version.

  • ALL The contents of the package will be compatible with all versions (ArcGIS Pro 2.1 and later).
  • CURRENT The contents of the package will be compatible with the current version of the ArcGIS Pro release.
  • 2.2 The contents of the package will be compatible with ArcGIS Pro version 2.2.
  • 2.3The contents of the package will be compatible with ArcGIS Pro version 2.3.
  • 2.4The contents of the package will be compatible with ArcGIS Pro version 2.4.
  • 2.5The contents of the package will be compatible with ArcGIS Pro version 2.5.
  • 2.6The contents of the package will be compatible with ArcGIS Pro version 2.6.
  • 2.7The contents of the package will be compatible with ArcGIS Pro version 2.7.
  • 2.8The contents of the package will be compatible with ArcGIS Pro version 2.8.
  • 2.9The contents of the package will be compatible with ArcGIS Pro version 2.9.
  • 3.0The contents of the package will be compatible with ArcGIS Pro version 3.0.
  • 3.1The contents of the package will be compatible with ArcGIS Pro version 3.1.
  • 3.2The contents of the package will be compatible with ArcGIS Pro version 3.2.
  • 3.3The contents of the package will be compatible with ArcGIS Pro version 3.3.
  • 3.4The contents of the package will be compatible with ArcGIS Pro version 3.4.
String
include_toolboxes
(Optional)

Specifies whether project toolboxes will be consolidated and included in the output package. All projects require a default toolbox, which will be included in the output package regardless of this setting.

  • TOOLBOXESProject toolboxes will be included in the output package. This is the default.
  • NO_TOOLBOXESProject toolboxes will not be included in the output package.
Boolean
include_history_items
(Optional)

Specifies whether geoprocessing history items will be consolidated and included in the output package. Included history items will consolidate the data required to reprocess the history item.

  • HISTORY_ITEMSHistory items will be included in the output package. This is the default.
  • NO_HISTORY_ITEMSHistory items will not be included in the output package.
  • VALID_HISTORY_ITEMS_ONLYOnly valid history items will be included in the output package. History items are invalid if any of the original input layers or tools cannot be found.
String
read_only
(Optional)

Specifies whether the project will be read-only. Read-only projects cannot be modified or saved.

  • READ_ONLYThe project will be read-only.
  • READ_WRITEThe project will be writable. This is the default.
Boolean
select_related_rows
(Optional)

Specifies whether the specified extent will be applied to related data sources.

  • KEEP_ONLY_RELATED_ROWSOnly related data corresponding to records within the specified extent will be consolidated.
  • KEEP_ALL_RELATED_ROWSRelated data sources will be consolidated in their entirety. This is the default.
Boolean
preserve_sqlite
(Optional)

Specifies whether mobile geodatabase data will be preserved in the output or written to file geodatabase format. If the input data is a mobile geodatabase network dataset, the output will be a mobile geodatabase.

  • CONVERT_SQLITEMobile geodatabase data will be converted to file geodatabase format. This is the default.
  • PRESERVE_SQLITE Mobile geodatabase data will be preserved as mobile geodatabase data in the output. The geodatabase will be included in its entirety.
Boolean

Code sample

PackageProject example 1 (Python window)

The following Python script demonstrates how to use the PackageProject function from the Python window.

import arcpy
p = arcpy.mp.ArcGISProject("CURRENT")
arcpy.management.PackageProject(p.filePath, f'E:\gisShare\projects\Pipelines\SE_Pipeline.ppkx', 'INTERNAL')
PackageProject example 2 (stand-alone script)

The following Python script turns all projects from a directory with the word oil in the file name into a project package (.ppkx).

import os
import arcpy

enterpriseProjectDir = r"\\centralFileServer\gisData\ArcGISProProjects"
sharedProjectDir = r"c:\publicFiles\sharedProjects"

walk = arcpy.da.Walk(enterpriseProjectDir, datatype="Project")

for dirpath, dirnames, filenames in walk:
    for filename in filenames:
        if "oil" in filename.lower():
            project = os.path.join(dirpath, filename)
            out_ppkx = os.path.join(sharedProjectDir, os.path.splitext(os.path.basename(project))[0] + ".ppkx")
            print(f"Packaging: {project} to {out_ppkx}")
            arcpy.management.PackageProject(project, out_ppkx, "EXTERNAL")

Environments

Special cases

Parallel Processing Factor

If the environment is not specified, the tool will use one half of the available cores.

Licensing information

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

Related topics