ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMRotationVisualVariable Class
Members Example

In This Topic
    CIMRotationVisualVariable Class
    In This Topic
    Represents a rotation visual variable.
    Object Model
    CIMRotationVisualVariable ClassCIMVisualVariableAuthoringInfo ClassCIMRotationVisualVariable ClassCIMRotationVisualVariable ClassCIMVisualVariableInfo ClassCIMVisualVariableInfo ClassCIMVisualVariableInfo Class
    Syntax
    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  
    }
    Find connected attribute field for rotation
    {
        // get the CIM renderer from the layer
        // Note: needs to be called on the MCT
        var cimRenderer = featureLayer.GetRenderer() as ArcGIS.Core.CIM.CIMSimpleRenderer;
        // get the collection of connected attributes for rotation
        var cimRotationVariable = cimRenderer.VisualVariables.OfType<ArcGIS.Core.CIM.CIMRotationVisualVariable>().FirstOrDefault();
        // the z direction is describing the heading rotation
        var rotationInfoZ = cimRotationVariable.VisualVariableInfoZ;
        var rotationExpression = rotationInfoZ.Expression; // this expression stores the field name  
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMVisualVariable
             ArcGIS.Core.CIM.CIMRotationVisualVariable

    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also