How to Upload Your Maps to Arcgis Online Within the Application Manager Process Using Python?


Product(s):Cube
Version(s):6.1 to 6.5
Area:Application Manager


When you work with ArcGIS, you save your work through a map template called an MXD file. A valid MXD file should be created with ArcMap, using the Cube dataset or shape files providing with the data to be visualized and the mapping layout. Here we saw how to include Python in your Application Manager work-flow. Using Python, it is also possible to directly publish to ArcGIS online your output (or input) MXD storing your results visualizations or mappings. An attached ZIP is provided for the solution example.

Solution

To be able to make this “dynamic” in the process, it is necessary to:

A Python User Program needs to be included in the Application Manager work-flow, as explained at the link above.

The input “sys.argv” for this Python script can be included through Catalog Keys, as below:

The process within this script is the following (as reported at the above source link):

Any error or message is written to the output Report.prn text file.

The {AGOL_Username} and the {AGOL_Password} Catalog Keys are used in conjunction with the arcpy.SignInToPortal_server function. Nevertheless, for ArcGIS 10.2 (and later) users, it could be necessary to comment out this part of the script as below:


And sign in / connect from ArcGIS for Desktop “File > Sign In” prior to run the Python program.


communities.bentley.com/.../Publishing_5F00_To_5F00_AGOL.zip