Select to view content in your preferred language

What is the p20 folder

3355
8
Jump to solution
04-07-2021 09:54 AM
ChrisHolmes
Frequent Contributor

If I run the following:

arcpy.ExtractPackage_management(prjTemplate, projectFolder)

Where:

prjTemplate = X:\Dev\BrokenLinks\ProjectTemplate\blankProject.aptx

projectFolder = X:\Projects\Project1

The template will be extracted to:

X:\Projects\Project1\p20\blankProject.aprx

What's this 'p20'?

thanks

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

This is by design. Whether you extract a Project Package/Template using an arcpy.ExtractPackage_management() function or the Extract Package GP Tool, the data gets extracted inside the subfolder ...\p20.



Think Location

View solution in original post

8 Replies
DanPatterson
MVP Esteemed Contributor

Not clear from your example whether the projectFolder existed already.  Because if it didn't, it would create a new one.

Extract Package (Data Management)—ArcGIS Pro | Documentation

In your case  X:\Projects\Project1 passed but in future you might want to try "raw encoding" the file

r"X:\Projects\Project1"  # --- note the little .... r ....

in case it got confused along the way.

On a side note... you didn't do 19 others already?  😉


... sort of retired...
ChrisHolmes
Frequent Contributor

Hi Dan,

I guess I wrote my question as pseudo code to be quicker (or lazier?). No, thankfully there are not 19 previous to 20. 

I am using os.mkdir to create projectFolder before calling extract package. After reading your comment I did a quick test without making the folder first and you're right it does create the folder while extracting the template. But it still works the same and add the \p20 folder.

In a nutshell, I'm expecting:

X:\Projects\Project1\blankProject.aprx

but what I'm getting is:

X:\Projects\Project1\p20\blankProject.aprx

Thanks 😊

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

This is by design. Whether you extract a Project Package/Template using an arcpy.ExtractPackage_management() function or the Extract Package GP Tool, the data gets extracted inside the subfolder ...\p20.



Think Location
ChrisHolmes
Frequent Contributor

Ok. Thanks Jayanta. I find that interesting... but good to know. Now when I deploy my Pro toolbox (which replaces a ArcMap toolbox) I can tell the endusers that the p20 folder is there by Esri's design. I wonder if it works like this in ArcMap? My toolbox in ArcMap doesn't use ExtractPackage so I can't say.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Project Package/ Project Template only applies for ArcGIS Pro. Extract Package in ArcMap doesn't work with Project Packages/Templates.



Think Location
0 Kudos
CliffordDRutledge
Emerging Contributor

To add to Jayanta's previous answer the p20 represents ArcGIS Pro 2.x You will also find a p30 folder kicking around if you are using 3.x now. Just adding this in for the next person that has this same question. All the best and Happy Mapping!

Jeff-Reinhart
Regular Contributor

It would be great if Esri could make this extraction type optional. Choices for "All Pro Versions" (current behavior) or "Current Pro Version" (same directory structure as original project) would work great. This would save folks the trouble of needing to explain to others they are sharing the package with what folder to use. Explanation is almost certainly necessary... "p20" and "p30" are not intuitive IMHO.

Alex_at_Exprodat
Occasional Contributor

Instead of using the Share As Layer Package option, instead use the Package Layer (Data Management)—ArcGIS Pro | Documentation geoprocessing tool. That tool includes the option to choose which versions you want to include, as well as an option to convert data to file geodatabase, include only data within a specific extent, etc.

Alex_at_Exprodat_0-1733484036081.png

As explained by @CliffordDRutledge above, package versions will include a p20 folder for Pro 2.x and p30 folder for Pro 3.x. 

 

0 Kudos