<?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: VB formula to python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374313#M16458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2 * math.sqrt (( !Accum! * %Pixel Size% * %Pixel Size%) / 3.14159265) - this is from the Pro version of Trees from Lidar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2019 19:55:53 GMT</pubDate>
    <dc:creator>ArthurCrawford</dc:creator>
    <dc:date>2019-03-26T19:55:53Z</dc:date>
    <item>
      <title>VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374308#M16453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get the tools Tree Points from LAS dataset and NAIP to work in ArcgisPro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a calculate field with the formula "2 * Sqr (([Accum] * %Pixel Size% * %Pixel Size%) /3.14159265)"&lt;/P&gt;&lt;P&gt;how do i get this to work in ArcgisPro with python&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2018 17:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374308#M16453</guid>
      <dc:creator>PeterVersteeg</dc:creator>
      <dc:date>2018-11-21T17:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374309#M16454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not familiar with this tool. If it is published somewhere, please provide a link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like this is in Model Builder (with the model variable %Pixel Size% in it).&lt;/P&gt;&lt;P&gt;This should work okay. I used a code block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# VBA Calculate Field expression&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# "2 * Sqr (([Accum] * %Pixel Size% * %Pixel Size%) /3.14159265)"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Calculate Field Python expression&lt;/SPAN&gt;
f&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!Accum!&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;Pixel Size&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Calculate Field Python code block&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; math
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;f&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;accum&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pix&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;accum &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; pix &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; pix&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pi&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Use PYTHON_9.3‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="Calculate Field expression in Python " class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/430074_Code.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374309#M16454</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T17:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374310#M16455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the tool&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.arcgis.com/home/item.html?id=d280e1c023084992b98088d9f14d3252" title="https://www.arcgis.com/home/item.html?id=d280e1c023084992b98088d9f14d3252"&gt;https://www.arcgis.com/home/item.html?id=d280e1c023084992b98088d9f14d3252&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i still have a error:&lt;/P&gt;&lt;P&gt;file "&amp;lt;string&amp;gt;", line 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;f(!Accum!, %pixel size%)&lt;/P&gt;&lt;P&gt;syntax error: invalid systax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am working in arcgis pro so python 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2018 20:44:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374310#M16455</guid>
      <dc:creator>PeterVersteeg</dc:creator>
      <dc:date>2018-11-21T20:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374311#M16456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your fields names as such? and is %pixel size% title cased? (%Pixel Size%)?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2018 22:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374311#M16456</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-21T22:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374312#M16457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree %Pixel Size% would be better as that's what the value field is named in the model.&lt;/P&gt;&lt;P&gt;You also may have to do this to force data type (VB kind of doesn't care)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f(!Accum!, float(%Pixel Size%))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The author of the tool unwisely left his email address so you may want to check with him and see if he any plans to upgrade to Pro. He may want a copy of your model!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 20:51:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374312#M16457</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2018-11-27T20:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: VB formula to python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374313#M16458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2 * math.sqrt (( !Accum! * %Pixel Size% * %Pixel Size%) / 3.14159265) - this is from the Pro version of Trees from Lidar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 19:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vb-formula-to-python/m-p/374313#M16458</guid>
      <dc:creator>ArthurCrawford</dc:creator>
      <dc:date>2019-03-26T19:55:53Z</dc:date>
    </item>
  </channel>
</rss>

