<?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: layer transparency not updating in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245961#M66431</link>
    <description>&lt;P&gt;Hi Sven,&lt;/P&gt;&lt;P&gt;My issue with that command layer.transperancy = someIntValue, is that even when I just type it from the console (after referencing one of the project's map layers as that layer I am trying to change) that nothing happens on screen. When I check after run that one line of code, to the layer color properties, the&amp;nbsp;transparency value, originally 0 (not transparent) is still 0; its like there no effect at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there even a possibility to change the layers colors or transparencies with python code via arcpy?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 11:38:27 GMT</pubDate>
    <dc:creator>BarakGarty</dc:creator>
    <dc:date>2023-01-06T11:38:27Z</dc:date>
    <item>
      <title>layer transparency not updating</title>
      <link>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245787#M66420</link>
      <description>&lt;P&gt;Got few layer (3) in a map in ArcGIS Pro project. Before I export the layout that its MapFrame is reference to the map holding these 3 layers I am trying to set the top 2 layers transparency so the bottom layer will be visible later when the layout is exported (as PDF file that is). I also tried to change the bottom layer to color black.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The changes does not takes place. I don't see that the layers I call a change in&amp;nbsp;transparency (lyr1 &amp;amp; lyr2; see code below) actually become less opaque. If I look at the color properties if each of these layers the&amp;nbsp;transparency&amp;nbsp; value is 0 and not the 70 or 60 I set it to. lyr3 is not turning black.&lt;/P&gt;&lt;P&gt;I am adding the code here, if anyone can suggest what am I doing wrong and how I can fix it, I'll appreciate it.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import arcpy.mp as map
from arcpy import env as ENV

try:
	#init variables:
	ENV.workspace = r"C:\Users\User\Desktop\PythonClassHWEx\L10_ClassWork\Ex10\Ex10.gdb"
	ENV.overwriteOutput = True
	arcpy.env.addOutputsToMap = False
	aprx = map.ArcGISProject(r"C:\Users\User\Desktop\PythonClassHWEx\L10_ClassWork\Ex10\Ex10_updated.aprx")
	map2 = aprx.listMaps('Map2')[0]
	lyr1 = map2.listLayers('layer1')[0]
	lyr2 = map2.listLayers('layer2')[0]
	lyr3 = map2.listLayers('layer3')[0]

	#Set layer 1&amp;amp;2 transparency:
	lyr1.transperancy = 70
	lyr2.transperancy = 60
	lyr3.symbology.renderer.symbol.color = {'RGB' : [255, 0, 0, 0]}

	#Export layout2 to PDF
    output = r"C:\Users\User\Desktop\PythonClassHWEx\L10_ClassWork\Ex10\Layout2.pdf"
    pdflyt = aprx.listLayouts("Layout2*")[0]
    pdflyt.exportToPDF(output)     
    print("Finished exporting layout2 as PDF file\n")
	
	
	print('Script Done!')
    
except arcpy.ExecuteError:
    print(arcpy.ExecuteError.args[0])

except Exception as e:
    print("Error: " + e.args[0])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 19:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245787#M66420</guid>
      <dc:creator>BarakGarty</dc:creator>
      <dc:date>2023-01-05T19:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: layer transparency not updating</title>
      <link>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245957#M66430</link>
      <description>&lt;P&gt;Maybe you have to save the project first before exporting the layout: aprx.save().&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 11:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245957#M66430</guid>
      <dc:creator>SvenHarpering55</dc:creator>
      <dc:date>2023-01-06T11:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: layer transparency not updating</title>
      <link>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245961#M66431</link>
      <description>&lt;P&gt;Hi Sven,&lt;/P&gt;&lt;P&gt;My issue with that command layer.transperancy = someIntValue, is that even when I just type it from the console (after referencing one of the project's map layers as that layer I am trying to change) that nothing happens on screen. When I check after run that one line of code, to the layer color properties, the&amp;nbsp;transparency value, originally 0 (not transparent) is still 0; its like there no effect at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there even a possibility to change the layers colors or transparencies with python code via arcpy?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 11:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245961#M66431</guid>
      <dc:creator>BarakGarty</dc:creator>
      <dc:date>2023-01-06T11:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: layer transparency not updating</title>
      <link>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245974#M66432</link>
      <description>&lt;P&gt;I know the problem when I address a project by path in the script or directly in ArcGIS Pro. Then I always had to save the project so that changes would also be visible in the layout.&lt;/P&gt;&lt;P&gt;What happens if you use the value "CURRENT" instead of the path? The change should then be directly visible. Also for the transparency.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 13:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layer-transparency-not-updating/m-p/1245974#M66432</guid>
      <dc:creator>SvenHarpering55</dc:creator>
      <dc:date>2023-01-06T13:24:17Z</dc:date>
    </item>
  </channel>
</rss>

