<?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: What data type is a Value Table in a geoprocessing tool? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/1333278#M10487</link>
    <description>&lt;P&gt;I'm definitely late in the discussion, but it may help someone who's looking for this topic.&lt;/P&gt;&lt;P&gt;I had the exact same problem as &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48909"&gt;@BenRufenacht&lt;/a&gt;&amp;nbsp;and I couldn't really understand the given answer since in the &lt;SPAN&gt;geometry_property&amp;nbsp;&lt;/SPAN&gt;only a pair of parameters are required and type is not part of the data. So what I did was to display the tool in the geoprocessing pane, put in some parameters and from there copy the python command as shown in this screenshot:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Asimov_0-1695895342241.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81874i5B7D551C9862130B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Asimov_0-1695895342241.png" alt="Asimov_0-1695895342241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Python command resulted as follows:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.CalculateGeometryAttributes(
in_features="ct Particelle",
geometry_property="AREA AREA",
length_unit="",
area_unit="SQUARE_METERS",
coordinate_system=None,
coordinate_format="SAME_AS_INPUT"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I just passed the same to MakeValueArray as follows:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var tool_name = "management.CalculateGeometryAttributes";
var geometry_property = "AREA AREA"
var areaUnit = "Square Meters";

var val_array = Geoprocessing.MakeValueArray(new object[] { _layer, geometry_property, null, areaUnit });

return await Geoprocessing.ExecuteToolAsync(tool_name, val_array);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Turned out it works as intended.&lt;/P&gt;&lt;P&gt;Sometimes it is really so much harder than it should be to find some reference about ESRI SDK issues, like this one. I found dozens code samples about using GeoProcessing tools, repeating the same key concepts again and again (usually with using the same tools, also), but I couldn't find any documentation/reference explaining how a "ValueType" parameter should be constructed and passed...hope this helps someone.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 10:19:54 GMT</pubDate>
    <dc:creator>Asimov</dc:creator>
    <dc:date>2023-09-28T10:19:54Z</dc:date>
    <item>
      <title>What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823977#M2965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run CalculateGeometryAttributes_management, but I can not figure out what data type to use for the&lt;/P&gt;&lt;DIV class=""&gt;geometry_property[[Target Field, Property],...]. It appears to be an IEnumerable&amp;lt;KeyValuePair&amp;lt;string,string&amp;gt;&amp;gt;. I tried to use a dictionary, as it has this value type, but it gave me an error. Here is what I have:&lt;/DIV&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Dictionary&amp;lt;string,string&amp;gt; items = new Dictionary&amp;lt;string, string&amp;gt; { "Area", "AREA" };&lt;BR /&gt;arguments1 = Geoprocessing.MakeValueArray(floodShape, items, "FEET_US", "SQUARE_FEET_US");&lt;BR /&gt;gpResult1 = Geoprocessing.ExecuteToolAsync("CalculateGeometryAttributes_management", arguments1, enviroment, null, null, GPExecuteToolFlags.None);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Anyone know what data type to use?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 18:35:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823977#M2965</guid>
      <dc:creator>BenRufenacht</dc:creator>
      <dc:date>2019-04-30T18:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823978#M2966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is recommended that a user always check the tool's documentation page to make sure the data type of each parameter. For example the doc for the tool is here - you can jump to this page by clicking on the help button (? mark).&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-geometry-attributes.htm"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-geometry-attributes.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you'll find the syntax:&lt;/P&gt;&lt;P&gt;CalculateGeometryAttributes_management (in_features, geometry_property, {length_unit}, {area_unit}, {coordinate_system})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below the syntax, you'll see data type of each parameter, with explanation and valid values.&lt;BR /&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 21:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823978#M2966</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2019-05-02T21:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823979#M2967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I said in my original question, the data type listed in the documentation is value table. My question is what data type in C# corresponds to data table. I have tried KeyValuePair, array of KeyValuePairs, lists of KeyValuePairs, and dictionaries. None of these will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 23:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823979#M2967</guid>
      <dc:creator>BenRufenacht</dc:creator>
      <dc:date>2019-05-02T23:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823980#M2968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I got it now. Here is the code that runs successfully for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var fields = "AAA TEXT 'A A A' 255 # #;BBB LONG 'B B B' # # #;CCC DOUBLE 'C C C' # # #";&lt;/P&gt;&lt;P&gt;# within double quote: field_name, field_type, field_alias, field_lenght (for string)&lt;/P&gt;&lt;P&gt;# for multiple fields (AddFields tool), separate two fields by semicolon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this syntax by running the tool via tool dialog and then drag-dropping the result from History tab to Python window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 00:31:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/823980#M2968</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2019-05-03T00:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/1333278#M10487</link>
      <description>&lt;P&gt;I'm definitely late in the discussion, but it may help someone who's looking for this topic.&lt;/P&gt;&lt;P&gt;I had the exact same problem as &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48909"&gt;@BenRufenacht&lt;/a&gt;&amp;nbsp;and I couldn't really understand the given answer since in the &lt;SPAN&gt;geometry_property&amp;nbsp;&lt;/SPAN&gt;only a pair of parameters are required and type is not part of the data. So what I did was to display the tool in the geoprocessing pane, put in some parameters and from there copy the python command as shown in this screenshot:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Asimov_0-1695895342241.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81874i5B7D551C9862130B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Asimov_0-1695895342241.png" alt="Asimov_0-1695895342241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Python command resulted as follows:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.CalculateGeometryAttributes(
in_features="ct Particelle",
geometry_property="AREA AREA",
length_unit="",
area_unit="SQUARE_METERS",
coordinate_system=None,
coordinate_format="SAME_AS_INPUT"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I just passed the same to MakeValueArray as follows:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var tool_name = "management.CalculateGeometryAttributes";
var geometry_property = "AREA AREA"
var areaUnit = "Square Meters";

var val_array = Geoprocessing.MakeValueArray(new object[] { _layer, geometry_property, null, areaUnit });

return await Geoprocessing.ExecuteToolAsync(tool_name, val_array);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Turned out it works as intended.&lt;/P&gt;&lt;P&gt;Sometimes it is really so much harder than it should be to find some reference about ESRI SDK issues, like this one. I found dozens code samples about using GeoProcessing tools, repeating the same key concepts again and again (usually with using the same tools, also), but I couldn't find any documentation/reference explaining how a "ValueType" parameter should be constructed and passed...hope this helps someone.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 10:19:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/1333278#M10487</guid>
      <dc:creator>Asimov</dc:creator>
      <dc:date>2023-09-28T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: What data type is a Value Table in a geoprocessing tool?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/1575202#M12494</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/704437"&gt;@Asimov&lt;/a&gt;&amp;nbsp;You sir, are the real mvp. You saved me from pulling my hair out lol. I tried so many things but none was working. To think that a value table equated to a simple string! If you go by the documentation, it looks like a list of lists...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 02:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/what-data-type-is-a-value-table-in-a-geoprocessing/m-p/1575202#M12494</guid>
      <dc:creator>MK13</dc:creator>
      <dc:date>2025-01-14T02:28:12Z</dc:date>
    </item>
  </channel>
</rss>

