0

I have many layers on a map. I need to write an Arcade expression in the symbol size expression box, but I need to do it in all the layers. I do not want to do that one by one.

I wanted to create a script that add the Arcade expression for the custom symbol size on ArcGIS Pro. I have already done a script before that adds a query layer expression automatically using:

if lyr.supports("DEFINITIONQUERY"):
     lyr.definitionQuery = ...

Obviously symbol size expression is totally different but it is still an expression that I want to add to all the layers.

Is this even possible?

I haven't found anything on forums yet.

enter image description here

1 Answer 1

1

If you want to script the setting of the symbol size using a custom expression then you need to be using the CIM module through ArcPy and you can control the ValueExpressionInfo. Take note of the cautions and I would recommend you install the CIM viewer so you can see a layers properties and then understand how to navigate the CIM properties via ArcPy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.