<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Rotate point symbol based on a field in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1379155#M11065</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;Thanks a lot.&amp;nbsp; It is working now!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 16:10:40 GMT</pubDate>
    <dc:creator>AquanuityDevelopment</dc:creator>
    <dc:date>2024-02-07T16:10:40Z</dc:date>
    <item>
      <title>Rotate point symbol based on a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1378904#M11060</link>
      <description>&lt;P&gt;I just could not make this attribute driven symbology feature to work using ArcGIS Pro SDK.&amp;nbsp; The following is a snippet of my code:&lt;/P&gt;&lt;P&gt;var render = lyr.CreateRenderer(simpleRender) as CIMSimpleRenderer;&lt;/P&gt;&lt;P&gt;var cimExpressionInfoZ = new CIMExpressionInfo { ReturnType=ExpressionReturnType.Numeric, Expression = "$feature.Direction" };&lt;BR /&gt;var cimVisualVariableInfoZ = new CIMVisualVariableInfo { VisualVariableInfoType = VisualVariableInfoType.Expression, ValueExpressionInfo = cimExpressionInfoZ};&lt;/P&gt;&lt;P&gt;var listCIMVisualVariables = new List&amp;lt;CIMVisualVariable&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;new CIMRotationVisualVariable {&lt;BR /&gt;VisualVariableInfoZ = cimVisualVariableInfoZ,&lt;BR /&gt;RotationTypeZ=SymbolRotationType.Arithmetic&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;render.VisualVariables = listCIMVisualVariables.ToArray();&lt;/P&gt;&lt;P&gt;lyr.SetRenderer(render);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to rotate the symbol based on a field called "Direction" with angles range 0 - 360.&amp;nbsp; The symbols have been rotated but not according to the values in "Direction" fields.&amp;nbsp; Any help will be great appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 22:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1378904#M11060</guid>
      <dc:creator>AquanuityDevelopment</dc:creator>
      <dc:date>2024-02-06T22:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate point symbol based on a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1378996#M11063</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try code below. It works for me.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;        protected override async void OnClick()
        {
            var featLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().First();
            await QueuedTask.Run(() =&amp;gt;
            {
                var render = featLayer.GetRenderer() as CIMSimpleRenderer;
                var cimVisualVariableInfoXY = new CIMVisualVariableInfo
                {
                    RandomMax = 360,
                    RandomMin = 0,
                    VisualVariableInfoType = VisualVariableInfoType.None
                };
                var cimExpressionInfoZ = new CIMExpressionInfo
                {
                    Title = "Custom",
                    ReturnType = ExpressionReturnType.Default,
                    Expression = "$feature.Direction"
                };
                var cimVisualVariableInfoZ = new CIMVisualVariableInfo
                {
                    RandomMax = 360,
                    RandomMin = 0,
                    VisualVariableInfoType = VisualVariableInfoType.Expression,
                    ValueExpressionInfo = cimExpressionInfoZ
                };
                var listCIMVisualVariables = new List&amp;lt;CIMVisualVariable&amp;gt;
                {
                    new CIMRotationVisualVariable {
                        VisualVariableInfoX = cimVisualVariableInfoXY,
                        VisualVariableInfoY = cimVisualVariableInfoXY,
                        VisualVariableInfoZ = cimVisualVariableInfoZ,
                        RotationTypeZ=SymbolRotationType.Arithmetic,
                        NormalToSurface = false
                    }
                };
                render.VisualVariables = listCIMVisualVariables.ToArray();
                featLayer.SetRenderer(render);
            });
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 09:37:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1378996#M11063</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-02-07T09:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate point symbol based on a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1379155#M11065</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;Thanks a lot.&amp;nbsp; It is working now!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 16:10:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1379155#M11065</guid>
      <dc:creator>AquanuityDevelopment</dc:creator>
      <dc:date>2024-02-07T16:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate point symbol based on a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1381131#M11078</link>
      <description>&lt;P&gt;nice one!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 16:35:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rotate-point-symbol-based-on-a-field/m-p/1381131#M11078</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2024-02-12T16:35:40Z</dc:date>
    </item>
  </channel>
</rss>

