<?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: ArcMap Field Calculator  Python in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053780#M2447</link>
    <description>&lt;P&gt;Seeing there are existing tools to accomplish this task, and yet you want to write it on your own without explaining why, it seems like this may be a question for school/studies.&amp;nbsp; If you can provide a reason why you have to write it in Python yourself, people may be more willing to help or offer additional suggestions.&lt;/P&gt;</description>
    <pubDate>Mon, 03 May 2021 14:29:53 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-05-03T14:29:53Z</dc:date>
    <item>
      <title>ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053497#M2435</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;I have a question concerning Python in ArcMap (field calculator):&lt;/P&gt;&lt;P&gt;I want to write following code with python, in attributes table; field calculator. But I can't.&lt;/P&gt;&lt;P&gt;Could you help me,&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim pSpRef1 As ISpatialReference &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pSpRFc As SpatialReferenceEnvironment &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pSpRFc = New SpatialReferenceEnvironment &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pGCS As IGeographicCoordinateSystem &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pGCS = &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pSpRFc.CreateGeographicCoordinateSystem(esriSRGeoCS_NAD1983) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pSpRef1 = pGCS &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pSpRef1.SetFalseOriginAndUnits -180, -90, 1000000 &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pPCS As IProjectedCoordinateSystem &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pSpRef2 As ISpatialReference &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pPCS = &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pSpRFc.CreateProjectedCoordinateSystem(esriSRProjCS_NAD1983USA_&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Albers) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pPCS.SetFalseOriginAndUnits 0, 0, 1000 &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pSpRef2 = pPCS &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim dblArea As double &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim CenterX As double &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim CenterY As double &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pArea As IArea &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pArea = [shape] &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Dim pGeo As IGeometry &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pGeo = pArea &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pGeo.SpatialReference = pSpRef1 &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pGeo.Project pSpRef2 &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Set pArea = pGeo &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;dblArea = pArea.Area &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;theKm = dblArea / 1000000 &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 01:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053497#M2435</guid>
      <dc:creator>pınarspor</dc:creator>
      <dc:date>2021-05-01T01:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053500#M2436</link>
      <description>&lt;P&gt;Use&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/add-geometry-attributes.htm" target="_blank"&gt;Add Geometry Attributes—Help | Documentation (arcgis.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to calculate geometry in a different coordinate system and/or units&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 03:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053500#M2436</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-01T03:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053519#M2440</link>
      <description>&lt;P&gt;Thenk you, but I need to know how in python&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 11:06:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053519#M2440</guid>
      <dc:creator>pınarspor</dc:creator>
      <dc:date>2021-05-01T11:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053550#M2441</link>
      <description>&lt;P&gt;Then examine the code associated with the tool's script located in&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\... your install folder ... \Resources\ArcToolBox\Scripts\AddGeometryAttributes.py&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You will probably be able to simplify it substantially.&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 18:49:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053550#M2441</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-01T18:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053555#M2442</link>
      <description>&lt;P&gt;Thank you again,&lt;/P&gt;&lt;P&gt;I examined it, but not&amp;nbsp;&amp;nbsp;figure it out. I'm new in Python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to write&amp;nbsp; with Python Parser of the Field Calculator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 22:51:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053555#M2442</guid>
      <dc:creator>pınarspor</dc:creator>
      <dc:date>2021-05-01T22:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053780#M2447</link>
      <description>&lt;P&gt;Seeing there are existing tools to accomplish this task, and yet you want to write it on your own without explaining why, it seems like this may be a question for school/studies.&amp;nbsp; If you can provide a reason why you have to write it in Python yourself, people may be more willing to help or offer additional suggestions.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 14:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1053780#M2447</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-05-03T14:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Field Calculator  Python</title>
      <link>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1054577#M2454</link>
      <description>&lt;P&gt;This is a situation related to Phd. I thought these steps wouldn't work, sometimes different results can come out, but they did.&lt;BR /&gt;thanks again, DanPatterson&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you JoshuaBixby&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 11:07:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/arcmap-field-calculator-python/m-p/1054577#M2454</guid>
      <dc:creator>pınarspor</dc:creator>
      <dc:date>2021-05-05T11:07:00Z</dc:date>
    </item>
  </channel>
</rss>

