<?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: Custom Symbology in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713864#M55368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort of,&amp;nbsp; turn your mxd into a MapDcoument object then use ListLayers to get the layer objects in the MXD.&amp;nbsp; You should then be able to pass that list layer Object into the layer to KML tool,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like below but I've probably mistyped something&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string 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="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; a folderpath to write kmls to
    outKML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; create a path &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; something like os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerToKML_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outKML&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:34:15 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-12-12T06:34:15Z</dc:date>
    <item>
      <title>Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713859#M55363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I have a client that needs individual KMZ layers exported fairly regularly. They also need the layers to have a custom symbology that needs to stay consistent. Most of the layers use unique values for their symbology. The layers are housed in an enterprise .sde. I was hoping to have everything in one .mxd and set up a script to utilize the 'map to kml' tool. Unfortunately, they won't accept a file that includes all of the layers Does anyone know of a way to accomplish this using python?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 14:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713859#M55363</guid>
      <dc:creator>AdamBakiera</dc:creator>
      <dc:date>2020-07-21T14:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713860#M55364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly you're looking for a script to look at all the layers in the MXD then export them as individual KMLs with appropriate names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 19:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713860#M55364</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-07-21T19:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713861#M55365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be great if I could get it to work with the .mxd because that would eliminate the need to have to write code for custom symbology.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 19:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713861#M55365</guid>
      <dc:creator>AdamBakiera</dc:creator>
      <dc:date>2020-07-21T19:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713862#M55366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any experience with python/arcpy? Or do you just want it written for you? It's pretty simple either way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 19:51:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713862#M55366</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-07-21T19:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713863#M55367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some experience but I'm far from expert level. Now that I've thought of this a little more, I think maybe I was overthinking. If I can set the workspace to be the .mxd and just have several 'layer to kml' lines, that should work, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 21:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713863#M55367</guid>
      <dc:creator>AdamBakiera</dc:creator>
      <dc:date>2020-07-21T21:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology in Python</title>
      <link>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713864#M55368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort of,&amp;nbsp; turn your mxd into a MapDcoument object then use ListLayers to get the layer objects in the MXD.&amp;nbsp; You should then be able to pass that list layer Object into the layer to KML tool,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like below but I've probably mistyped something&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string 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="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; a folderpath to write kmls to
    outKML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; create a path &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; something like os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerToKML_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outKML&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-symbology-in-python/m-p/713864#M55368</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-12-12T06:34:15Z</dc:date>
    </item>
  </channel>
</rss>

