<?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>idea Export Symbology as Python in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idi-p/1310119</link>
    <description>&lt;P&gt;&lt;STRONG&gt;I'd like the ability to export the symbology of a layer in the ArcGIS Pro canvas as a python snippet.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I'm writing a script tool that performs some loading and symbology of layers, I sometimes have to run the script over and over again to ensure that the symbology is what I want.&lt;/P&gt;&lt;P&gt;It would be really cool if I were able to export symbology I'm happy with as a Python snippet that I could then just drop in a script tool with a little refactoring.&lt;/P&gt;&lt;P&gt;Specifically, I see this working by using the hamburger (overflow) menu in the Symbology tab, click the menu, and then maybe an "export as python" (which would save it to a file) or "Copy python snippet" (builds/stashes the snippet in the clipboard for pasting into a script -- this is my preferred method).&lt;/P&gt;&lt;P&gt;This would save a huge amount of time when it comes to the more tedious aspects of script tool construction (and symbology definitely falls in that category!) allowing analysts/devs to focus more on the core geoprocessing and worrying less about coming up with symbology code from scratch.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2023 13:12:09 GMT</pubDate>
    <dc:creator>EricEagle</dc:creator>
    <dc:date>2023-07-31T13:12:09Z</dc:date>
    <item>
      <title>Export Symbology as Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idi-p/1310119</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I'd like the ability to export the symbology of a layer in the ArcGIS Pro canvas as a python snippet.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I'm writing a script tool that performs some loading and symbology of layers, I sometimes have to run the script over and over again to ensure that the symbology is what I want.&lt;/P&gt;&lt;P&gt;It would be really cool if I were able to export symbology I'm happy with as a Python snippet that I could then just drop in a script tool with a little refactoring.&lt;/P&gt;&lt;P&gt;Specifically, I see this working by using the hamburger (overflow) menu in the Symbology tab, click the menu, and then maybe an "export as python" (which would save it to a file) or "Copy python snippet" (builds/stashes the snippet in the clipboard for pasting into a script -- this is my preferred method).&lt;/P&gt;&lt;P&gt;This would save a huge amount of time when it comes to the more tedious aspects of script tool construction (and symbology definitely falls in that category!) allowing analysts/devs to focus more on the core geoprocessing and worrying less about coming up with symbology code from scratch.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 13:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idi-p/1310119</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2023-07-31T13:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export Symbology as Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1310127#M25733</link>
      <description>&lt;P&gt;I like this idea. Symbology is really hard to maintain and more tools are always welcome.&lt;/P&gt;&lt;P&gt;I'll also mention that one workaround I've used is to export a lyrx file and then edit the json directly and then re-apply it. For example, I had a unique value renderer and due to a datafix some of the values changed but I wanted to apply the same symbology from the older value to the newer value. So I just manually edited the values in the file, leaving the rest of the symbology the same.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 16:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1310127#M25733</guid>
      <dc:creator>JakeJacobsAVA</dc:creator>
      <dc:date>2023-07-20T16:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Export Symbology as Python - Status changed to: Needs Clarification</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1313289#M25810</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/171761"&gt;@EricEagle&lt;/a&gt;, this can be done using the &lt;A href="https://github.com/esri/cim-spec" target="_self"&gt;CIM specification&lt;/A&gt;, specifically the &lt;A href="https://github.com/Esri/cim-spec/blob/main/docs/v2/CIMRenderers.md#cimrenderer-1" target="_self"&gt;renderer&lt;/A&gt;&amp;nbsp;for vector data. When applying symbology to the result in a script tool, you can use the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/setparametersymbology.htm" target="_self"&gt;arcpy.SetParameterSymbology&lt;/A&gt; method. The &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/setting-output-symbology-in-scripts.htm" target="_blank"&gt;Output symbology in scripts—ArcGIS Pro&lt;/A&gt;&amp;nbsp;documentation explains how to view the CIM definition of a layer and how to find the renderer definition within it. You can also use &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm" target="_self"&gt;cim access&lt;/A&gt;&amp;nbsp;properties to programmatically modify the CIM definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this provides what you are looking for?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 22:26:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1313289#M25810</guid>
      <dc:creator>HannesZiegler</dc:creator>
      <dc:date>2023-07-28T22:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export Symbology as Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1313735#M25815</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/50334"&gt;@HannesZiegler&lt;/a&gt;&amp;nbsp;Thanks for the response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case I am talking about a specific workflow enhancement.&amp;nbsp; Yes you can do everything under arcpy - but I am looking more for the following workflow:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;User adds content (raster or vector) to the map canvas.&lt;/LI&gt;&lt;LI&gt;User styles the content in the way that they want using the GUI symbology options, getting everything exactly right.&lt;/LI&gt;&lt;LI&gt;User exports that symbology state as a python snippet for use in a script.&amp;nbsp; Obviously certain variables will need to be changed as any python snippet generated would point to a specific data source rather than a variable.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The workflow here differs from what you suggest because instead of &lt;EM&gt;anticipating&lt;/EM&gt; the symbology in the IDE and then tweaking it as iterations are run, the user would &lt;EM&gt;start&lt;/EM&gt; from a finished/approved symbology, lightly editing it into a script.&amp;nbsp; Additionally, the CIM workflow requires a .lyrx file - what I am suggesting would be done on the fly, and &lt;EM&gt;may&lt;/EM&gt; not need to be expressed in CIM terms (i.e., the current symbology should be returned as python in its simplest form for use in a script).&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 18:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1313735#M25815</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2023-07-31T18:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export Symbology as Python - Status changed to: Under Consideration</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1316627#M25900</link>
      <description>&lt;P&gt;We have near term plans to help with applying existing symbology to other existing objects.&amp;nbsp; We will take your scenario into consideration when designing a workflow and may post some follow-up questions as we get closer to development.&lt;/P&gt;&lt;P&gt;Jeff - Layout and arcpy.mp teams&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 21:06:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/export-symbology-as-python/idc-p/1316627#M25900</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2023-08-08T21:06:28Z</dc:date>
    </item>
  </channel>
</rss>

