<?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: What is arcpy.cim? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259757#M11377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for reporting this!&amp;nbsp; You are correct; late in 2.4 development we changed the CamelBack format of the object members to be consistent with the managed API.&amp;nbsp; I failed to update example 3 and you caught it.&amp;nbsp; The script was corrected and will appear in&amp;nbsp;the next help publication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The missing line that you added is NOT required if the symbol already has a dashed effect.&amp;nbsp; What&amp;nbsp;the line did&amp;nbsp;essentially was generate the effect.&amp;nbsp; This is something you need to be very careful about doing.&amp;nbsp; The Developer Summit plenary video does show the line you added.&amp;nbsp; That particular example is a simple use case but due to the complexity of object creation where new objects have dependencies on addition objects, it is easy to create objects that may fail in the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The arcpy.cim module is necessary for CIM support but we intentionally did not&amp;nbsp;document it.&amp;nbsp; We hope that with future builds we will provide helper functions that will make it easier and more reliable to create new objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Oct 2019 22:40:15 GMT</pubDate>
    <dc:creator>JeffBarrette</dc:creator>
    <dc:date>2019-10-10T22:40:15Z</dc:date>
    <item>
      <title>What is arcpy.cim?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259755#M11375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;In the help for ArcGIS Pro 2.4's &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/python-cim-access.htm"&gt;Python CIM access&lt;/A&gt; there is "Example 3: Modify layer symbology" which has this code:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Reference a project, map, and layer using arcpy.mp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = arcpy.mp.ArcGISProject('current')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p.listMaps('Trail Routes')[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = m.listLayers('Loops')[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return the layer's CIM definition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cim_lyr = lyr.getDefinition('V2')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Modify the color, width and dash template for the SolidStroke layer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1 = cim_lyr.Renderer.Symbol.Symbol.SymbolLayers[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.Color.Values = [250, 250, 40, 50]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.Width = 8&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ef1 = symLvl1.Effects[0]&amp;nbsp;&amp;nbsp;&amp;nbsp; #Note, deeper indentation&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ef1.DashTemplate = [20, 30]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Modify the color/transparency for the SolidFill layer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl2 = cim_lyr.Renderer.Symbol.Symbol.SymbolLayers[1]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl2.Color.Values = [140, 70, 20, 20]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Push the changes back to the layer object&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.setDefinition(cim_lyr)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I think the documentation was written before finalization of ArcGIS Pro 2.4, where this functionality was introduced for the first time, because it seems to contain capitalization errors, and is missing a key line that I picked up by watching a &lt;A href="https://www.youtube.com/watch?time_continue=2&amp;amp;v=8wgt8bKD0Ww"&gt;YouTube video from Esri's 2019 Developer Summit&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;This code should work correctly:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Reference a project, map, and layer using arcpy.mp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = arcpy.mp.ArcGISProject('current')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p.listMaps('Trail Routes')[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = m.listLayers('Loops')[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return the layer's CIM definition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cim_lyr = lyr.getDefinition('V2')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Modify the color, width and dash template for the SolidStroke layer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1 = cim_lyr.renderer.symbol.symbol.symbolLayers[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.color.values = [250, 250, 40, 50]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.width = 8&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.effects = [arcpy.cim.CIMGeometricEffectDashes()]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ef1 = symLvl1.effects[0]&amp;nbsp;&amp;nbsp;&amp;nbsp; #Note, deeper indentation&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ef1.dashTemplate = [20, 30]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Modify the color/transparency for the SolidFill layer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl2 = cim_lyr.renderer.symbol.symbol.symbolLayers[1]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl2.color.values = [140, 70, 20, 20]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Push the changes back to the layer object&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.setDefinition(cim_lyr)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The missing line (which I added in the above) is:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; symLvl1.effects = [arcpy.cim.CIMGeometricEffectDashes()]&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Is `arcpy.cim` an undocumented ArcPy module, function or class, and to learn about it, is reading the &lt;A href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic44.html"&gt;ArcGIS.Core.CIM Namespace&lt;/A&gt; .NET SDK API Reference the only way?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have reported what I believe to be the documentation error using the link at the bottom of that help page.&amp;nbsp; I have also asked this question on another site as&amp;nbsp;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/338301/what-is-arcpy-cim" title="https://gis.stackexchange.com/questions/338301/what-is-arcpy-cim"&gt;symbology - What is arcpy.cim? - Geographic Information Systems Stack Exchange&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:04:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259755#M11375</guid>
      <dc:creator>GraemeBrowning</dc:creator>
      <dc:date>2019-10-10T22:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is arcpy.cim?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259756#M11376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/python-cim-access.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/python-cim-access.htm"&gt;Python CIM access—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in your install path for exploration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\&lt;STRONG&gt;YourInstallFolder&lt;/STRONG&gt;\Resources\ArcPy\arcpy\cim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:26:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259756#M11376</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-10-10T22:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is arcpy.cim?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259757#M11377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for reporting this!&amp;nbsp; You are correct; late in 2.4 development we changed the CamelBack format of the object members to be consistent with the managed API.&amp;nbsp; I failed to update example 3 and you caught it.&amp;nbsp; The script was corrected and will appear in&amp;nbsp;the next help publication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The missing line that you added is NOT required if the symbol already has a dashed effect.&amp;nbsp; What&amp;nbsp;the line did&amp;nbsp;essentially was generate the effect.&amp;nbsp; This is something you need to be very careful about doing.&amp;nbsp; The Developer Summit plenary video does show the line you added.&amp;nbsp; That particular example is a simple use case but due to the complexity of object creation where new objects have dependencies on addition objects, it is easy to create objects that may fail in the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The arcpy.cim module is necessary for CIM support but we intentionally did not&amp;nbsp;document it.&amp;nbsp; We hope that with future builds we will provide helper functions that will make it easier and more reliable to create new objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259757#M11377</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2019-10-10T22:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: What is arcpy.cim?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259758#M11378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's been about a year since you wrote the note above. Would you say that at this point the helper functions that you anticipated have been released?&amp;nbsp; Or are they still a work in progress?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or would you say the trajectory of fine-graded access to symbology changed so that arcpy users are more likely to need to learn the nuances of CIM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your&amp;nbsp;insights.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2020 15:53:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259758#M11378</guid>
      <dc:creator>LauraTateosian</dc:creator>
      <dc:date>2020-10-05T15:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is arcpy.cim?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259759#M11379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, at 2.5 we introduced this.&amp;nbsp; THere is a new section in the Python CIM Access topic titled Creating CIM Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/python-cim-access.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/python-cim-access.htm"&gt;Python CIM access—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2020 14:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-is-arcpy-cim/m-p/259759#M11379</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2020-10-06T14:49:28Z</dc:date>
    </item>
  </channel>
</rss>

