Help setting up a folder data store

484
0
10-03-2022 10:22 PM
MichaelBell
New Contributor III

I'm trying to set up and use a folder data store, so that I can access a layout.pagx file stored on my server in code (specifically, in ConvertWebMapToArcGISProject). ArcPy code should be something like this:

 

templatePath = "\\myserver.com\server\LayoutStorage"
templateFile = "layout.pagx"
templateFull = os.path.join(templatePath, templateFile)
result = arcpy.mp.ConvertWebMapToArcGISProject(data, templateFull)

 

 Where LayoutStorage is the name of my folder data store, and layout.pagx is my layout file (see convertwebmaptoarcgisproject and data-store-items)

Now, I don't think I've set this up correctly.

The folder I've set up to be my data store is located on the server, simply at C:\Datastore_Layouts. In here there is the layout.pagx file (so C:\Datastore_Layouts\layout.pagx). The folder is shared with the ArcGIS user accounts.

The data store item, in my Portal, has been set to address the \\localhost\Datastore_Layouts folder. This has been validated. It can be accessed by my https://myserver.com/server server (with a green tick next to it for status).

However, I keep getting:

RuntimeError: Missing or invalid layout template file.

 I must say though that, for testing purposes, I am doing this on my local install of ArcGIS Pro (and not on the server machine).

Any help would be greatly appreciated - this is (hopefully) the last thing I need to get on this. Either that, or if there is a way to address a layout.pagx file from the existing Portal?

0 Kudos
0 Replies