Hello,
I am trying to use arcpy in ArcGIS Pro to set properties on layers including the description and summary. I am using
the metadata object to do this. The properties get saved. However, they are not used as the layer has not been set to
have it own metadata. How do I do this in arcpy? The current code is similar to the following
layerMetadata = layer.metadata
layerMetadata.description = description
layerMetadata.summary = summary
# The following do not have an effect
# layer.metadata = layerMetadata
# layerMetadata.save()
# This saves the metadata. However the layer is not set to use it
aprx.save()
Thanks,
Solved! Go to Solution.
Thanks for the reply. Unfortunately, neither of those work. I found that getting and setting the layer definition does allow this to be changed.
e.g.
However, setting the definition (even if no changes have been made to the object) cause the layer to become disconnected. I'll raise a separate post for that.
Thanks for the reply. Unfortunately, neither of those work. I found that getting and setting the layer definition does allow this to be changed.
e.g.
However, setting the definition (even if no changes have been made to the object) cause the layer to become disconnected. I'll raise a separate post for that.