Hi All,
Is there any way to enable/disable popups in Arcpy for pro?
I am using ArcPro 2.4.0
I have a number of layers in a map that I am preparing for sharing into Portal and we wish to turn off popups for some and enable them for others.
I am using .LRYX files to style the features and popups are disabled in the layer file ( "htmlPopupEnabled" : false, & "showPopups" : false, ) but it does not seem to be reading the layer file for this setting ( I am running Apply Symbology from Layer)
Thanks in advance.
Solved! Go to Solution.
You can enable/disable pop ups using python and the ArcPro CIM module. The basic code is:
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('phi_clip')[0]
l_cim = l.getDefinition('V2')
l_cim.showPopups = False
l.setDefinition(l_cim)
Note: phi_clip is a layer name in my project, obviously change it to your requirements
You can enable/disable pop ups using python and the ArcPro CIM module. The basic code is:
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('phi_clip')[0]
l_cim = l.getDefinition('V2')
l_cim.showPopups = False
l.setDefinition(l_cim)
Note: phi_clip is a layer name in my project, obviously change it to your requirements