<?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: Convert Python expression from ArcMap to Arcade in ArcPro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153133#M52718</link>
    <description>&lt;P&gt;Thanks for replying but that is not the window I see when I label the hatch marks.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expression_Builder.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36195i1272F17A4331D9FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Expression_Builder.jpg" alt="Expression_Builder.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 23:38:05 GMT</pubDate>
    <dc:creator>janderson_ksninc</dc:creator>
    <dc:date>2022-03-11T23:38:05Z</dc:date>
    <item>
      <title>Convert Python expression from ArcMap to Arcade in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153021#M52700</link>
      <description>&lt;P&gt;I've created hatch marks on a line to use as stationing for a levee feature on a map but I need to format the labels to read like stations rather than just numbers. I'm able to do this in ArcMap (see attached screenshot) using the following expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;def FindLabel (esri__measure):&lt;BR /&gt;EM = str(int(round(esri__measure)))&lt;BR /&gt;if len(EM) == 0:&lt;BR /&gt;return "0+00"&lt;BR /&gt;elif len(EM) == 1:&lt;BR /&gt;return "0+0{0}".format(*EM)&lt;BR /&gt;elif len(EM) == 2:&lt;BR /&gt;return "0+{0}{1}".format(*EM)&lt;BR /&gt;elif len(EM) == 3:&lt;BR /&gt;return "{0}+{1}{2}".format(*EM)&lt;BR /&gt;elif len(EM) == 4:&lt;BR /&gt;return "{0}{1}+{2}{3}".format(*EM)&lt;BR /&gt;elif len(EM) == 5:&lt;BR /&gt;return "{0}{1}{2}+{3}{4}".format(*EM)&lt;BR /&gt;elif len(EM) == 6:&lt;BR /&gt;return "{0}{1}{2}{3}+{4}{5}".format(*EM)&lt;/P&gt;&lt;P&gt;Now I have to do the same thing but in ArcPro and I'm only given the option to do this using Arcade. Does anybody know how I can convert the expression/script above from Python to Arcade? I'm a novice at both languages so any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Levee_Stations_ArcMap.JPG" style="width: 731px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36157iCBB55E5F2FDD5A1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Levee_Stations_ArcMap.JPG" alt="Levee_Stations_ArcMap.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 18:56:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153021#M52700</guid>
      <dc:creator>janderson_ksninc</dc:creator>
      <dc:date>2022-03-11T18:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Python expression from ArcMap to Arcade in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153029#M52702</link>
      <description>&lt;P&gt;Label class properties in Pro should let you pick Python to use the existing code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_0-1647025865523.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36161i35F7A45C244807F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_0-1647025865523.png" alt="RhettZufelt_0-1647025865523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 19:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153029#M52702</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-03-11T19:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Python expression from ArcMap to Arcade in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153133#M52718</link>
      <description>&lt;P&gt;Thanks for replying but that is not the window I see when I label the hatch marks.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expression_Builder.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36195i1272F17A4331D9FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Expression_Builder.jpg" alt="Expression_Builder.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 23:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153133#M52718</guid>
      <dc:creator>janderson_ksninc</dc:creator>
      <dc:date>2022-03-11T23:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Python expression from ArcMap to Arcade in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153134#M52719</link>
      <description>&lt;P&gt;My team lead showed me this post that solved my problem.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/stationing-lines-in-arcgis-pro/td-p/1021220" target="_blank"&gt;Solved: Stationing lines in ArcGIS Pro - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 23:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153134#M52719</guid>
      <dc:creator>janderson_ksninc</dc:creator>
      <dc:date>2022-03-11T23:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Python expression from ArcMap to Arcade in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153948#M52810</link>
      <description>&lt;P&gt;Now that I've figured this out, does anybody know how I would convert these to annotation? Now that the levee station numbers have been generated, I can't figure out how to rotate&amp;nbsp;them into place. I'd like to convert the numbers to annotation but I can't find how to do that since the station numbers are not true labels since they are not based on attribute table values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Levee Station Placement.JPG" style="width: 830px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36411iB579A3DB7EBE5E2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Levee Station Placement.JPG" alt="Levee Station Placement.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 18:31:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/convert-python-expression-from-arcmap-to-arcade-in/m-p/1153948#M52810</guid>
      <dc:creator>janderson_ksninc</dc:creator>
      <dc:date>2022-03-15T18:31:13Z</dc:date>
    </item>
  </channel>
</rss>

