<?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: Multipart polygon - individual part areas in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528603#M41407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you were so helpful with this thread, maybe you could suggest whether or not the following would be possible without creating additional datasets to accomplish what I need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a multipart polygon feature that has 4 parts to it. I would like a way to label each individual part with its part number (1 to 4) and its corresponding area. Is there any way of accomplishing this without making interim/temporary datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2017 13:50:37 GMT</pubDate>
    <dc:creator>AlanTonkin</dc:creator>
    <dc:date>2017-09-12T13:50:37Z</dc:date>
    <item>
      <title>Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528597#M41401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a polygon feature class in a file geodatabase. There are a few multipart polygons in the dataset. I have added 2 fields to the dataset to store the number of parts (numeric) and one to store a list of the individual part areas (string).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have populated the field with the number of parts using one of the functions in the EasyCalculate Add-In. However, I require assistance with populating my string field with a delimited list of the individual part areas for any multipart polygons in the dataset. So for example, if a polygon has 4 parts to it, the value for the string field that I want calculated should look like this -&amp;gt; "541.00;236.54;147.85;391.25" being the individual areas of the parts of the multipart polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found some python code that iterated through the polygons and their respective parts and printed the results to the python window. However I need to concatenate the areas into a delimited string and write the string to the feature. I cannot seem to get that part of the code correct. Here is the link to the thread on another website for accessing the part areas&amp;nbsp;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/76089/getting-area-of-multipart-features-using-searchcursor-of-arcpy" title="https://gis.stackexchange.com/questions/76089/getting-area-of-multipart-features-using-searchcursor-of-arcpy"&gt;python 2.7 - Getting area of multipart features using SearchCursor() of ArcPy? - Geographic Information Systems Stack Ex…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please could someone help with the code to write the individual areas in the string back to the feature?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528597#M41401</guid>
      <dc:creator>AlanTonkin</dc:creator>
      <dc:date>2017-09-11T06:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528598#M41402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/17610" target="_blank"&gt;Alan Tonkin&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory one should be able to do this using the following code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PolygonAreaText&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_area &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; part &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; polygon&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnts &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; pnt &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; part&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnts&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pol2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polygon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst_pnts&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polygon&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; pol2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_area&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pol2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area&lt;SPAN class="punctuation 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="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="string token"&gt;';'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst_area&lt;SPAN class="punctuation token"&gt;)&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, when I ran the code on an example multipart polygon dataset it bounced an error. Probably because the polygon is passed to the function as a GPVARIANT and doesn't allow iteration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alternative is to create a script that will loop through the features and updates the field that will hold the area of the parts:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;main&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\xbakker\Documents\ArcGIS\Default.gdb\ejemplo2_Dissolve'&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fld_areatext &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'AreaText'&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; flds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SHAPE@'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fld_areatext&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; flds&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; curs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; curs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; area_text &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PolygonAreaText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; area_text
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; area_text
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PolygonAreaText&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_area &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; part &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; polygon&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnts &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; pnt &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; part&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_pnts&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pol2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polygon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst_pnts&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; polygon&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; pol2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lst_area&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pol2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area&lt;SPAN class="punctuation 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="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="string token"&gt;';'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst_area&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; __name__ &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__main__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; main&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this case you would have to change the path to your featureclass on line 3 and the name of the field that will hold the areas of the parts. Below the result on my simple dataset:&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/370616_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:01:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528598#M41402</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T23:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528599#M41403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/xander_bakker"&gt;xander_bakker&lt;/A&gt;‌, I am a bit confused, not about the overall solution but your first comment.&amp;nbsp; You said the first code block should work but doesn't, but then the code block was used as is in your second code block.&amp;nbsp; Was there a different code block that generated the error you speak of?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 14:45:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528599#M41403</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-09-11T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528600#M41404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the confusion. Indeed the code block works in the stand alone script, but when used as function in the&amp;nbsp;Field Calculator it throws an error.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 14:50:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528600#M41404</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-09-11T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528601#M41405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply to my thread. I am running this from the Python window within my ArcMap MXD so I have taken some guidelines from your code posted above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what it looks like now and it is working 100% as I need it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;... from arcpy import env&lt;BR /&gt;... env.workspace = 'some.gdb'&lt;BR /&gt;... fc = 'someFC'&lt;BR /&gt;... fld_areatext = 'AREA_TEXT'&lt;BR /&gt;... flds = ('SHAPE@', fld_areatext)&lt;BR /&gt;... edit = arcpy.da.Editor(env.workspace)&lt;BR /&gt;... edit.startEditing(False, True)&lt;BR /&gt;... edit.startOperation()&lt;BR /&gt;... with arcpy.da.UpdateCursor(fc, flds) as curs:&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; for row in curs:&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; polygon = row[0]&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lst_area = []&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for part in polygon:&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; poly = arcpy.Polygon(part)&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lst_area.append(round(poly.area,2))&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; poly_text = ';'.join(lst_area)&lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row[1] = poly_text &lt;BR /&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; curs.updateRow(row)&lt;BR /&gt;... edit.stopOperation() &lt;BR /&gt;... edit.stopEditing(True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your assistance. Much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:31:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528601#M41405</guid>
      <dc:creator>AlanTonkin</dc:creator>
      <dc:date>2017-09-11T15:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528602#M41406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great to hear that it is working!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528602#M41406</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-09-11T17:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528603#M41407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you were so helpful with this thread, maybe you could suggest whether or not the following would be possible without creating additional datasets to accomplish what I need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a multipart polygon feature that has 4 parts to it. I would like a way to label each individual part with its part number (1 to 4) and its corresponding area. Is there any way of accomplishing this without making interim/temporary datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528603#M41407</guid>
      <dc:creator>AlanTonkin</dc:creator>
      <dc:date>2017-09-12T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528604#M41408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid that will not be possible since labels are based on attributes and the parts are all part of a single feature. You will have to apply multi part to single part tool (&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/multipart-to-singlepart.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/multipart-to-singlepart.htm"&gt;Multipart To Singlepart—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;) to achieve that result.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528604#M41408</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-09-12T13:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528605#M41409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a feeling that you were going to say that. I wanted to avoid creating disjointed datasets to achieve the labelling that I require.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528605#M41409</guid>
      <dc:creator>AlanTonkin</dc:creator>
      <dc:date>2017-09-12T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygon - individual part areas</title>
      <link>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528606#M41410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it really necessary to maintain the dataset with multipart features or could this be changed to single parts? You could also create label point for each part and label those, but this will include the creation of a new dataset.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 15:11:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multipart-polygon-individual-part-areas/m-p/528606#M41410</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-09-12T15:11:35Z</dc:date>
    </item>
  </channel>
</rss>

