In the layer properties of each layer there is an option "Show MapTips using the display expression" that is by default disabled and I would like to find out if there is a way to enable this option by default for all layers or by using arcpy.
I have tried to run arcpy.UpdateLayer but that would update either only the symbology properties or every layer property.
Layer Properties
1 Answer 1
Whenever I have seen this option grayed out it is because the shapefile (or feature class) does not have a spatial index.
To address this from a script I would use the Add Spatial Index (Data Management) tool.
To do it on every shapefile (feature class) I would use arcpy.da.Walk to visit every workspace and run the tool on any shapefiles (feature classes) found.
If your question is about checking/unchecking the option then this GeoNet thread suggests that the only way to do that is via ArcObjects.
Explore related questions
See similar questions with these tags.