ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMUniqueValueRenderer Class / VisualVariables Property
Example

In This Topic
    VisualVariables Property (CIMUniqueValueRenderer)
    In This Topic
    Gets or sets the visual variables.
    Syntax
    Public Property VisualVariables As CIMVisualVariable()
    public CIMVisualVariable[] VisualVariables {get; set;}
    Example
    Get the attribute rotation field of a layer
    {
        //Note: needs to be called on the MCT
        var cimRenderer = featureLayer.GetRenderer() as CIMUniqueValueRenderer;
        //Gets the visual variables from the renderer
        var cimRotationVariable = cimRenderer.VisualVariables.OfType<CIMRotationVisualVariable>().FirstOrDefault();
        //Gets the visual variable info for the z dimension
        var rotationInfoZ = cimRotationVariable.VisualVariableInfoZ;
        //The Arcade expression used to evaluate and return the field name for the rotation
        var rotationExpression = rotationInfoZ.ValueExpressionInfo.Expression; // this expression stores the field name  
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also