ArcGIS Pro 3.2 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 CIMVisualVariable[] VisualVariables {get; set;}
    Public Property VisualVariables As CIMVisualVariable()
    Example
    Get the attribute rotation field of a layer
    var featureLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
    QueuedTask.Run(() =>
    {
      var cimRenderer = featureLayer.GetRenderer() as CIMUniqueValueRenderer;
      var cimRotationVariable = cimRenderer.VisualVariables.OfType<CIMRotationVisualVariable>().FirstOrDefault();
      var rotationInfoZ = cimRotationVariable.VisualVariableInfoZ;
      var rotationExpression = rotationInfoZ.ValueExpressionInfo.Expression; // this expression stores the field name  
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also