
public class CIMRotationVisualVariable : CIMVisualVariable, System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
Public Class CIMRotationVisualVariable Inherits CIMVisualVariable Implements System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
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 });
var featureLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { // get the CIM renderer from the layer 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 });
System.Object
ArcGIS.Core.CIM.CIMObject
ArcGIS.Core.CIM.CIMVisualVariable
ArcGIS.Core.CIM.CIMRotationVisualVariable
Target Platforms: Windows 11, Windows 10