<?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: How to change the text color of an Annotation class via arcpy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341370#M69026</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was this one I was thinking about:&amp;nbsp;&lt;A href="https://mediaspace.esri.com/media/t/1_5okim9at" target="_blank" rel="noopener"&gt;Map Automation - Esri Videos: GIS, Events, ArcGIS Products &amp;amp; Industries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Not exactly labels, but think you can do something similar.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 14:05:15 GMT</pubDate>
    <dc:creator>CarstenB_orsted</dc:creator>
    <dc:date>2023-10-25T14:05:15Z</dc:date>
    <item>
      <title>How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341258#M69024</link>
      <description>&lt;P&gt;I am struggling to change the text color of an Annotation class via arcpy.&lt;/P&gt;&lt;P&gt;For example, I have this in my ArcGIS Pro project:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbd_bayern_0-1698225007437.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83892i4DB21A673D617ED2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbd_bayern_0-1698225007437.png" alt="lbd_bayern_0-1698225007437.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A simple point which is annotated with the text "272.22".&amp;nbsp;&lt;/P&gt;&lt;P&gt;The properties of this instance&amp;nbsp;"272.22" of the Annotation class look as follows (some attribute values are German; "Platziert" means "placed", "Nein" means "no", "Unten" means "Bottom", "Links" means "left", so nothing wild):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbd_bayern_1-1698225159947.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83893i2E14D10DC4078D7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="lbd_bayern_1-1698225159947.png" alt="lbd_bayern_1-1698225159947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I look at the properties of the layer of the Annotation class in the content tree, the following properties are displayed (again some German attributes and attribute values, but I think the concrete values are not relevant for the problem and pretty self-explanatory as well):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbd_bayern_2-1698225451962.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83894iDAFB0554C7D3DA24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbd_bayern_2-1698225451962.png" alt="lbd_bayern_2-1698225451962.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I change the color of all the texts of this Annotation class via arcpy?&lt;/P&gt;&lt;P&gt;In my arcpy script, I already have a reference to the corresponding layer object (acquired via the &lt;FONT face="courier new,courier"&gt;listLayers()&lt;/FONT&gt; method of the active map). The Annotation's layer does not have a symbology, so I can't change the color via &lt;FONT face="courier new,courier"&gt;symbology.renderer.symbol.color&lt;/FONT&gt;. Is there a way for Annotations? I am executing my script in the ArcGIS Pro python window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 09:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341258#M69024</guid>
      <dc:creator>lbd_bayern</dc:creator>
      <dc:date>2023-10-25T09:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341364#M69025</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure you can do this with the functionality exposed in arcpy.&lt;/P&gt;&lt;P&gt;I think I would try CIM. It's a bit finicky to use, but you have access to all the settings that you have in the dialogs. The challenge is to find which setting to change in the huge JSONS.&lt;/P&gt;&lt;P&gt;More info here:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm" target="_blank"&gt;Python CIM access—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think I have seen a demo where they changed label colors using CIM. Maybe plenary at Developer Summit 2019?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 13:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341364#M69025</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2023-10-25T13:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341370#M69026</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was this one I was thinking about:&amp;nbsp;&lt;A href="https://mediaspace.esri.com/media/t/1_5okim9at" target="_blank" rel="noopener"&gt;Map Automation - Esri Videos: GIS, Events, ArcGIS Products &amp;amp; Industries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Not exactly labels, but think you can do something similar.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 14:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341370#M69026</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2023-10-25T14:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341443#M69029</link>
      <description>&lt;P&gt;This code snippet makes all my annotation text blue &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;m = p.listMaps()[0]&lt;BR /&gt;l = m.listLayers()[0]&lt;BR /&gt;cim_l = l.getDefinition('V3')&lt;BR /&gt;cim_l.symbolSubstitutionType = 'Color'&lt;BR /&gt;cim_l.massColorSubstitute.values = [0, 0, 255, 100]&lt;BR /&gt;l.setDefinition(cim_l)&lt;/P&gt;&lt;P&gt;I hope this can get you started! CIM is fun!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 15:26:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1341443#M69029</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2023-10-25T15:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1346007#M69160</link>
      <description>&lt;P&gt;Hi Carsten,&lt;/P&gt;&lt;P&gt;nice, thank you so much!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&amp;nbsp;This is already what I needed. Cheers!&lt;/P&gt;&lt;P&gt;(PS: Sorry for my late response, had some stress in some other projects and also was sick for a few days.)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 10:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1346007#M69160</guid>
      <dc:creator>lbd_bayern</dc:creator>
      <dc:date>2023-11-06T10:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1348714#M69225</link>
      <description>&lt;P&gt;No worries. I am happy that you could use it!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 15:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1348714#M69225</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2023-11-13T15:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the text color of an Annotation class via arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1666931#M74922</link>
      <description>&lt;P&gt;Old post I'm rehashing, but I ran into something that I thought could help others. Your comment totally helped get me in the right direction and learning about CIM, huge thanks!&lt;BR /&gt;&lt;BR /&gt;I am working with automating conversion and publishing of CAD files, AutoCAD DWG specifically. When the annotation layer is added, by default the color is 'None' and this code doesn't work. I was getting an AttributeError that "object has no attribute type 'values'". I found in&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm#:~:text=The%20following%20code%20will%20create,Set%20the%20map%27s%20CIM%20definition" target="_self"&gt;the documentation here&lt;/A&gt;&amp;nbsp;that I had to create the color CIM object first and then set the definition with that when reading.&lt;BR /&gt;&lt;BR /&gt;My code looks similar to this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps("Map Name")[0]
l = m.listLayers("Layer Name")[0]
cim_l = l.getDefinition('V3')
cim_l.symbolSubstitutionType = 'Color'
colorRGB = arcpy.cim.CreateCIMObjectFromClassName('CIMRGBColor', 'V3')
colorRGB.values = [0, 0, 255, 100]
cim_1.massColorSubstitute = colorRGB
l.setDefinition(cim_l)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 21:50:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-change-the-text-color-of-an-annotation/m-p/1666931#M74922</guid>
      <dc:creator>TylerBoychuk</dc:creator>
      <dc:date>2025-11-18T21:50:58Z</dc:date>
    </item>
  </channel>
</rss>

