<?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 How can I get listSymbolsFromGallery() to pull from a style file? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-can-i-get-listsymbolsfromgallery-to-pull-from/m-p/1304280#M68067</link>
    <description>&lt;P&gt;The documentation for the Symbol.listSymbolsFromGallery() method says (emphasis mine):&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN class=""&gt;listSymbolsFromGallery&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;provides a mechanism to return a list of symbols that exists in a system or &lt;STRONG&gt;&lt;EM&gt;project&lt;/EM&gt; &lt;/STRONG&gt;style gallery.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I create a layer in memory through a geoprocessing tool, using only raw paths as inputs and not existing map layers, then the resulting layer is not associated with any project (I think). So, if I then call&amp;nbsp;listSymbolsFromGallery() like so...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;symbols = my_layer.symbology.renderer.symbol.listSymbolsFromGallery(symbol_name)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...then Pro apparently only pulls system&amp;nbsp;symbols and not project symbols. Makes sense.&lt;/P&gt;&lt;P&gt;However, if I then add that layer to a map in a project &lt;EM&gt;that has a style file added&lt;/EM&gt;, and save the project...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;aprx_map.addLayer(my_layer)
aprx.save()
symbols = my_layer.symbology.renderer.symbol.listSymbolsFromGallery(symbol_name)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;...then&amp;nbsp;listSymbolsFromGallery() still does not list the symbols in the project's style file.&lt;/P&gt;&lt;P&gt;How can I get&amp;nbsp;listSymbolsFromGallery() to pull symbols from a style file?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 01:02:29 GMT</pubDate>
    <dc:creator>AndrewGilbert</dc:creator>
    <dc:date>2023-06-29T01:02:29Z</dc:date>
    <item>
      <title>How can I get listSymbolsFromGallery() to pull from a style file?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-listsymbolsfromgallery-to-pull-from/m-p/1304280#M68067</link>
      <description>&lt;P&gt;The documentation for the Symbol.listSymbolsFromGallery() method says (emphasis mine):&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN class=""&gt;listSymbolsFromGallery&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;provides a mechanism to return a list of symbols that exists in a system or &lt;STRONG&gt;&lt;EM&gt;project&lt;/EM&gt; &lt;/STRONG&gt;style gallery.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I create a layer in memory through a geoprocessing tool, using only raw paths as inputs and not existing map layers, then the resulting layer is not associated with any project (I think). So, if I then call&amp;nbsp;listSymbolsFromGallery() like so...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;symbols = my_layer.symbology.renderer.symbol.listSymbolsFromGallery(symbol_name)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...then Pro apparently only pulls system&amp;nbsp;symbols and not project symbols. Makes sense.&lt;/P&gt;&lt;P&gt;However, if I then add that layer to a map in a project &lt;EM&gt;that has a style file added&lt;/EM&gt;, and save the project...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;aprx_map.addLayer(my_layer)
aprx.save()
symbols = my_layer.symbology.renderer.symbol.listSymbolsFromGallery(symbol_name)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;...then&amp;nbsp;listSymbolsFromGallery() still does not list the symbols in the project's style file.&lt;/P&gt;&lt;P&gt;How can I get&amp;nbsp;listSymbolsFromGallery() to pull symbols from a style file?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 01:02:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-listsymbolsfromgallery-to-pull-from/m-p/1304280#M68067</guid>
      <dc:creator>AndrewGilbert</dc:creator>
      <dc:date>2023-06-29T01:02:29Z</dc:date>
    </item>
  </channel>
</rss>

