<?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 SetRotation() strange behavior with clockwise rotations in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828309#M3194</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to programatically rotate a piece of text of a Layout. The Element class's SetRotation() method works as expected with positive numbers (counterclockwise rotations), but trying to use negative numbers for clockwise rotations is not. Instead of simply rotating in the expected rotation, the piece of text is rotated and turned upside down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480256_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to rotate up to 90 degrees to the left / counterclockwise, things turn out okay. But if I need to rotate the opposite way, such as in this scenario, the text ends up flipped so that you'd have to skew your head more than 90 degrees to see it straight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some extra anchor setting I need to use to get the expected behavior? Using the Arc Pro GUI, inserting a Layout element and setting the rotation does not cause the same behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Feb 2020 19:52:44 GMT</pubDate>
    <dc:creator>DavidLaMartina</dc:creator>
    <dc:date>2020-02-04T19:52:44Z</dc:date>
    <item>
      <title>SetRotation() strange behavior with clockwise rotations</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828309#M3194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to programatically rotate a piece of text of a Layout. The Element class's SetRotation() method works as expected with positive numbers (counterclockwise rotations), but trying to use negative numbers for clockwise rotations is not. Instead of simply rotating in the expected rotation, the piece of text is rotated and turned upside down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480256_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to rotate up to 90 degrees to the left / counterclockwise, things turn out okay. But if I need to rotate the opposite way, such as in this scenario, the text ends up flipped so that you'd have to skew your head more than 90 degrees to see it straight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some extra anchor setting I need to use to get the expected behavior? Using the Arc Pro GUI, inserting a Layout element and setting the rotation does not cause the same behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 19:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828309#M3194</guid>
      <dc:creator>DavidLaMartina</dc:creator>
      <dc:date>2020-02-04T19:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: SetRotation() strange behavior with clockwise rotations</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828310#M3195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David&lt;/P&gt;&lt;P&gt;Can you please share a code snippet? I am not seeing this behavior with 2.4 so a code snippet might help to narrow down what you are seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 23:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828310#M3195</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-02-04T23:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: SetRotation() strange behavior with clockwise rotations</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828311#M3196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/86730"&gt;Uma Harano&lt;/A&gt;‌.&amp;nbsp; Do you know if this is still an issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do something similar.....rotate a point feature symbol (ie. set ROTATION field) to a value that orients it properly for mapping.&amp;nbsp; In my old ArcObjects code I would do this with "line" being the line that the point is attached to at the TO node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object missing = Type.Missing;&lt;BR /&gt; ILine line = new LineClass();&lt;BR /&gt; line.FromPoint = fromPoint;&lt;BR /&gt; line.ToPoint = toPoint;&lt;/P&gt;&lt;P&gt;double angle = (180 * line.Angle / (System.Math.PI));&lt;/P&gt;&lt;P&gt;return angle;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ArcPro SDK I have tried everything I can think of to get this to work, but the results are all over the place.&amp;nbsp; I have no idea where I am going wrong.&amp;nbsp; i am creating the line in ArcPro SDK like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var lineBuilder = new LineBuilder(fromPoint, toPoint);&lt;BR /&gt; var line = lineBuilder.ToSegment();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2020 18:53:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828311#M3196</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2020-08-07T18:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: SetRotation() strange behavior with clockwise rotations</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828312#M3197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;Is this the workflow you are trying to achieve?&lt;/P&gt;&lt;P&gt;1. Create a line (Is this a graphic line element in a map/layout?)&lt;/P&gt;&lt;P&gt;2. Get the inclination angle of the line.&lt;/P&gt;&lt;P&gt;3. Align text on this line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2020 18:21:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828312#M3197</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-08-12T18:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: SetRotation() strange behavior with clockwise rotations</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828313#M3198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/86730"&gt;Uma Harano&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I eventually figured this out.&amp;nbsp; Back in ArcObjects, things just seemed to work differently.&amp;nbsp; What I am trying to do is set the ROTATION of an 'end of line' point feature so that things look proper when mapping.&amp;nbsp; After lots of messing about, I finally figured out that if I just applied a * -1 to my formula and then everything worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var lineBuilder = new LineBuilder(fromPoint, toPoint);&lt;BR /&gt; var line = lineBuilder.ToSegment();&lt;/P&gt;&lt;P&gt;double Rad2Degrees = 180 / Math.PI;&lt;BR /&gt; var degrees = (line.Angle * Rad2Degrees) * -1;&lt;BR /&gt; return degrees;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 14:08:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setrotation-strange-behavior-with-clockwise/m-p/828313#M3198</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2020-08-13T14:08:55Z</dc:date>
    </item>
  </channel>
</rss>

