Select to view content in your preferred language

Issue with saving a project copy to a physical file

278
0
05-22-2019 01:47 AM
RicardoRodrigues1
Emerging Contributor

Hi,

I'm having an issue with losing a drawing layer datasource:

result = arcpy.mp.ConvertWebMapToArcGISProject(Web_Map_as_JSON, templatePagx)

aprx = result.ArcGISProject

map = aprx.listMaps('Web Map')[0]

aprx.saveACopy(r'C:\OUTPUTTESTE\Test.aprx')

aprxTemp = arcpy.mp.ArcGISProject(r'C:\OUTPUTTESTE\Test.aprx')

map1 = aprxTemp.listMaps('Web Map')[0]

map1.listLayers()

Basically when I check the layers of the "map" object the layer named "pointLayer" (which consists of a drawn point exported from Web App Builder) has a datasource.

After saving a copy of the project and re-opening it, if I check the layer again on the object "map1" everything is equal but the datasource is empty meaning I lost the drawn point.

Does anyone know if this is a bug or if there's a workaround for this?

Thanks in advance

0 Kudos
0 Replies