I have 40 layers with the same table schema and I need to apply symbology and table settings from another layer. I have a template layer and applying symbology works as expected.
Is it possible to apply fields visibility and formats as well?
I can see pasteProperties (source_layer, {layer_paste_properties}) method but when applying in on a layer object I get the following error: AttributeError: 'Layer' object has no attribute 'pasteProperties'
L = map.addDataFromPath(r"..\Address.lyrx")
for lyr in map.listLayers():
print(lyr.name)
lyr.pasteProperties(L, layer_paste_properties="FIELD_PROPERTIES")
Thanks,