<?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 Hatch Text Expression Question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351179#M27532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to label mileposts every tenth of a mile on a highway which starts at milepost 35. While I've figure out how to make hatching every tenth of a mile and add 35 to each hatch, the hatching is off by 0.00000000000001 a few miles in and the label shows that many digits the rest of the way. While there is an easy way to make the precision value 0.0 in the drop down menu, this is grayed out if I build a hatch text expression so I need to incorporate rounding into my hatch text expression and I have no idea how to do that. My measured polyline is one record with a length field but I was using esri_measure + 35 to get the values. How do I add 35 to the hatching value and round it to the nearest tenth? I'm new to measured polylines in case you couldn't tell. Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2014 22:39:41 GMT</pubDate>
    <dc:creator>IvySchultz1</dc:creator>
    <dc:date>2014-05-13T22:39:41Z</dc:date>
    <item>
      <title>Hatch Text Expression Question</title>
      <link>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351179#M27532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to label mileposts every tenth of a mile on a highway which starts at milepost 35. While I've figure out how to make hatching every tenth of a mile and add 35 to each hatch, the hatching is off by 0.00000000000001 a few miles in and the label shows that many digits the rest of the way. While there is an easy way to make the precision value 0.0 in the drop down menu, this is grayed out if I build a hatch text expression so I need to incorporate rounding into my hatch text expression and I have no idea how to do that. My measured polyline is one record with a length field but I was using esri_measure + 35 to get the values. How do I add 35 to the hatching value and round it to the nearest tenth? I'm new to measured polylines in case you couldn't tell. Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 22:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351179#M27532</guid>
      <dc:creator>IvySchultz1</dc:creator>
      <dc:date>2014-05-13T22:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch Text Expression Question</title>
      <link>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351180#M27533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried using the Python round function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; x = 35.00000000000001 &amp;gt;&amp;gt;&amp;gt; y = round(x,1) &amp;gt;&amp;gt;&amp;gt; y 35.0 &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 00:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351180#M27533</guid>
      <dc:creator>LT</dc:creator>
      <dc:date>2014-05-14T00:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch Text Expression Question</title>
      <link>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351181#M27534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Have you tried using the Python round function?&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; x = 35.00000000000001
&amp;gt;&amp;gt;&amp;gt; y = round(x,1)
&amp;gt;&amp;gt;&amp;gt; y
35.0
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help! I found another expression that worked before I saw your post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;round((esri__measure+35),2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's good to have a reference of how it would look in python too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:30:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hatch-text-expression-question/m-p/351181#M27534</guid>
      <dc:creator>IvySchultz1</dc:creator>
      <dc:date>2021-12-11T16:30:37Z</dc:date>
    </item>
  </channel>
</rss>

