Hi,
I am using PortalUploadSettings to automate the upload .spk files to ArcGIS online according
to the example in the documents:
uploadsettings = PortalUploadSettings()
uploadsettings.setFile("/general/data/rpk/rpkassets_simple_01.rpk")
uploadsettings.setTitle("RPK_Script_Upload")
uploadsettings.setDescription("RPK from apidoctest script cga0")
uploadsettings.setUsername(username)
uploadsettings.setPassword(password)
ce.upload(uploadsettings)
but CityEngine pops up a form asking for the filename even when I have done "setFile".
Have others been successful using PortalUploadSettings?
Hi Robert,
in an standard CityEngine installation the RPK referenced in the example does not exist.
This is the reason the "Select file for upload..." dialog pops up.
Please verify in your script, that the file intended for upload does exist by using:
import os.path os.path.exists(ce.toFSPath(workspacePath))
Hi,
I used the example as a reference and used my own file name
I used the "os.path.exists" check and it came back true, but the popup form still came up.
In the meantime, I've worked around this problem by doing a system call to a script that does the equivalent POST to arcGIS online. This works out even better, because I also want to create a scene layer from the scene layer package and share it with the public.
-Robert