<?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: Using Geoprocessing API to convert Feature Class to Shapefile in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794621#M1734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is a sample that shows you how you get the JSON representation of a Symbol. You can also get thte XML representation of the symbol by using the &lt;A href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic3877.html"&gt;CIMSymbol.ToXML method instead&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/SymbolLookup" title="https://github.com/ArcGIS/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/SymbolLookup"&gt;SymbolLookup sample&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Oct 2019 16:41:23 GMT</pubDate>
    <dc:creator>UmaHarano</dc:creator>
    <dc:date>2019-10-28T16:41:23Z</dc:date>
    <item>
      <title>Using Geoprocessing API to convert Feature Class to Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794619#M1732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone explain to me how I can use the Geoprocessing API to&amp;nbsp;export a&amp;nbsp;feature class in the currently open map as a shapefile feature class? For one the Geoprocessing calls require a tool name, which is just a string, and I'm not sure where I'd find this information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also like to know what functions I should call to get symbology definitions for said feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically in my add-in I want to the user to be able to select a layer in the current map via some tree view (which I already have working), and then they can click Export which will export said layer as a shapefile with associated symbology. I had this working with ArcObjects but I'm not sure how it is done with ArcGIS Pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 14:40:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794619#M1732</guid>
      <dc:creator>RawMcGee</dc:creator>
      <dc:date>2019-10-28T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Geoprocessing API to convert Feature Class to Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794620#M1733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer my own question, this is the easiest way to convert a layer to a shapefile.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;        &lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;async&lt;/SPAN&gt; Task&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;ConvertShp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; layerpath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; outpath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IO&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Directory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Exists&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outpath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IO&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Directory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateDirectory&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outpath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; valueArray &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&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; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;//input layers list should contain the path of each layer name, i.e. if the root node is "Mapping" and the layer name is "gs_points", path is "Mapping\\gs_points".&lt;/SPAN&gt;
                List&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; inlayers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;List&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;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;
                inlayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerpath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;//outpath is just the folder to save the shapefiles in&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; Geoprocessing&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;MakeValueArray&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inlayers&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outpath&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;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

            &lt;SPAN class="comment token"&gt;// to let the GP tool run asynchronously without blocking the main thread&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// use the GPThread option of GPExecuteToolFlasgs&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;//&lt;/SPAN&gt;
            GPExecuteToolFlags flags &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GPExecuteToolFlags&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPThread&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;// instruct the tool run non-blocking GPThread&lt;/SPAN&gt;
            IGPResult gpResult &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; Geoprocessing&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ExecuteToolAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FeatureClassToShapefile_conversion"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; valueArray&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; flags&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gpResult&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ReturnValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                  &lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; $&lt;SPAN class="string token"&gt;@"Error in gp tool: {gpResult.ErrorMessages}"&lt;/SPAN&gt;
                  &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $&lt;SPAN class="string token"&gt;@"Ok: {gpResult.ReturnValue}"&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still trying to figure out how to export symbology though. Meaning I need some way to enumerate through the symbol definitions for a specified feature layer. So that I can write it out in the format I need (XML).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It basically looks like Geoprocessing is a wrapper for ArcPy stuff? I'm not sure how I'd do more granular modifications to the data when exporting. If I wanted to change a column name or something, seems like there is no easy way to do it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794620#M1733</guid>
      <dc:creator>RawMcGee</dc:creator>
      <dc:date>2021-12-12T09:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Geoprocessing API to convert Feature Class to Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794621#M1734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is a sample that shows you how you get the JSON representation of a Symbol. You can also get thte XML representation of the symbol by using the &lt;A href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic3877.html"&gt;CIMSymbol.ToXML method instead&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/SymbolLookup" title="https://github.com/ArcGIS/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/SymbolLookup"&gt;SymbolLookup sample&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-geoprocessing-api-to-convert-feature-class/m-p/794621#M1734</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2019-10-28T16:41:23Z</dc:date>
    </item>
  </channel>
</rss>

