Can anyone provide some guidance on sharing project templates? I'm attempting to find best practices about how to properly share an .aptx template with colleagues. The main pieces of the template are a Python toolbox, several layouts, and SDE connections.
Yes, I have already read both https://pro.arcgis.com/en/pro-app/latest/help/projects/create-your-own-project-template.htm and https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/package-project.htm, but perhaps I'm missing something obvious.
Background: We are attempting to convert an internal tool from ArcMap to ArcGIS Pro. The tool relies on Python scripts to generate a series of map PDFs. We have successfully rewritten the scripts to use Python3 and arcpy.mp and converted .mxds to .pagxs. Everything runs fine from the development .aprx. That is, all of the PDFs are generated as desired. I'm now attempting to package up a template .aptx, but I quickly run into errors when I run the Python tool. The errors are not all that informative, and troubleshooting from the aptx-generated project is cumbersome. I'm currently conjecturing that the issues might be related to file paths as the .aptx seems to add some lines of code and reorganize file locations in the project folder. I'll add that the source files are saved on network folders, but it doesn't seem to make much difference if I use relative paths or absolute paths.
Update: Talked the problem over with some Esri folks. As a result I am going to explore the use of geoprocessing packages (.gpkx) rather than project templates (.aptx). I will come back to this post to update.
Ryan--I just came across your entry. We have scripts we're trying to share via a template as well and the ESRI path changes cause the scripts to fail. Did you end up going with the geoprocessing package instead? Thanks, Silas
Hi @SilasMathes ,
No, after some exploring I found the .aptx less than ideal for our purposes. It's been long enough that I don't remember the exact issues now.
We ended up using a Python toolbox (.pyt) with supporting files (.py, .pagx, SDE connections, .lyrx, etc.) contained in a directory in the same folder as the .pyt. It generally works well, but development hasn't been without it's headaches.