How to I replace UpdateLayer in ArcGIS Pro

89
2
a week ago
Labels (1)
cwsmith13181
New Contributor

I have started converting a tool from ArcMap to ArcGIS Pro and am having difficulty finding a function that is equitant to arcpy.mapping.UpdateLayer for ArcGIS Pro. Any ideas what functions I should use to replace this line of code:

arcpy.mapping.UpdateLayer(dataframe, afs_layer, sourceAfsSymbologyLayer, True)

 

0 Kudos
2 Replies
Robert_LeClair
Esri Frequent Contributor

I'm not a Python coder at all but one thing to try to troubleshoot is run the Analyze Tools for Pro geoprocessing tool on your Python script file.  The GP tool will write out a text file with suggestions on how to correct an ArcMap authored Python script to run in ArcGIS Pro.  In the meantime, I'll keep researching the question.

0 Kudos
Robert_LeClair
Esri Frequent Contributor

An update - in researching the UpdateLayer function, there is an item in the internals about not having an equivalent to arcpy.mapping.UpdateLayer or UpdateTime.  But there is a different solution available - the developers have exposed Python CIM access to gain access to more capabilities.  You can read more about this here.

0 Kudos