<?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: CIM Access: Layer doesn't support &amp;quot;getDefinition&amp;quot;, is actually a MappingLayer (undocumented). in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335562#M68862</link>
    <description>&lt;P&gt;Yeah, the multi-value complaint is extraneous; I just hate that it returns a value table instead a list like multivalue parameters do in ATBXs.&lt;/P&gt;&lt;P&gt;Just very confused as to why PYTs don't bring in Layer objects from parameters. (and why it's not documented!?)&lt;/P&gt;&lt;P&gt;In this case, I just needed to read the CIM, but I shudder at the idea of updating it this way.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 20:08:12 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2023-10-05T20:08:12Z</dc:date>
    <item>
      <title>CIM Access: Layer doesn't support "getDefinition", is actually a MappingLayer (undocumented).</title>
      <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335214#M68846</link>
      <description>&lt;P&gt;Pro 2.9.5&lt;/P&gt;&lt;P&gt;Touching up a tool I wrote last year, including migrating it from a scripting tool (ATBX) to a python toolbox (PYT). Part of the workflow involves &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm" target="_blank" rel="noopener"&gt;accessing CIM&lt;/A&gt;, using a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank" rel="noopener"&gt;layer&lt;/A&gt; from the map as an input.&lt;/P&gt;&lt;P&gt;The tool runs great in the ATBX.&lt;/P&gt;&lt;PRE&gt;cim_lyr= FC.getDefinition('V2')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;However, something REALLY WEIRD happens in the PYT.&lt;/P&gt;&lt;P&gt;I get the following error message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1696457254029.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/82343i56804177D14888BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1696457254029.png" alt="AlfredBaldenweck_0-1696457254029.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;AttributeError: 'MappingLayerObject' object has no attribute 'getDefinition'&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hmm, let's investigate this and make sure that I'm putting in what I think I am.&lt;/P&gt;&lt;P&gt;In the map:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap
lay = mp.listLayers("colton*")
lay= lay[0]
print(type(lay))
#&amp;lt;class 'arcpy._mp.Layer'&amp;gt;
print(dir(lay))
# ['URI', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', 
# '__eq__', '__format__', '__from_scripting_arc_object__', '__ge__', 
# '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__',
# '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', 
# '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', 
# '__subclasshook__', '__weakref__', '_arc_object', 'brightness', 
# 'connectionProperties', 'contrast', 'dataSource', 'definitionQuery', 
# 'disableTime', 'enableTime', 'extrusion', 'getDefinition', 
# 'getSelectionSet', 'is3DLayer', 'isBasemapLayer', 'isBroken', 
# 'isFeatureLayer', 'isGroupLayer', 'isNetworkAnalystLayer', 
# 'isNetworkDatasetLayer', 'isRasterLayer', 'isSceneLayer', 'isTimeEnabled', 
# 'isWebLayer', 'listDefinitionQueries', 'listLabelClasses', 'listLayers', 
# 'listTables', 'longName', 'maxThreshold', 'metadata', 'minThreshold', 
# 'name', 'saveACopy', 'setDefinition', 'setSelectionSet', 'showLabels',
# 'supports', 'symbology', 'time', 'transparency', 
# 'updateConnectionProperties', 'updateDefinitionQueries', 
# 'updateLayerFromJSON', 'visible']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Okay, so clearly a layer and definitely supports getDefinition.&lt;/P&gt;&lt;P&gt;Cool. Let's check in the ATBX script.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.AddMessage(type(FC))
#&amp;lt;class 'arcpy._mp.Layer'&amp;gt;
arcpy.AddMessage(dir(FC))
# ['URI', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', 
# '__eq__', '__format__', '__from_scripting_arc_object__', '__ge__', 
# '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', 
# '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', 
# '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', 
# '__subclasshook__', '__weakref__', '_arc_object', 'brightness', 
# 'connectionProperties', 'contrast', 'dataSource', 'definitionQuery', 
# 'disableTime', 'enableTime', 'extrusion', 'getDefinition', 
# 'getSelectionSet', 'is3DLayer', 'isBasemapLayer', 'isBroken', 
# 'isFeatureLayer', 'isGroupLayer', 'isNetworkAnalystLayer', 
# 'isNetworkDatasetLayer', 'isRasterLayer', 'isSceneLayer', 'isTimeEnabled', 
# 'isWebLayer', 'listDefinitionQueries', 'listLabelClasses', 'listLayers', 
# 'listTables', 'longName', 'maxThreshold', 'metadata', 'minThreshold', 
# 'name', 'saveACopy', 'setDefinition', 'setSelectionSet', 'showLabels', 
# 'supports', 'symbology', 'time', 'transparency', 
# 'updateConnectionProperties', 'updateDefinitionQueries', 
# 'updateLayerFromJSON', 'visible']&lt;/LI-CODE&gt;&lt;P&gt;Still supports getDefinition.&lt;/P&gt;&lt;P&gt;Let's check the PYT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.AddMessage(type(FC))
&amp;lt;class 'MappingLayerObject'&amp;gt;
arcpy.AddMessage(dir(FC))
# ['GetCimJSONString', 'SetCimJSONString', 'URI', 'UpdateLayerFromJSON', 
# '_XML', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', 
# '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', 
# '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', 
# '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', 
# '__str__', '__subclasshook__', '_id', '_pUnk', 'brightness', 
# 'connectionProperties', 'contrast', 'dataSource', 'definitionQuery', 
# 'disableTime', 'enableTime', 'extrusion', 'getSelectionSet', 'is3DLayer', 
# 'isBasemapLayer', 'isBroken', 'isFeatureLayer', 'isGroupLayer', 
# 'isLayerSame', 'isNetworkAnalystLayer', 'isNetworkDatasetLayer', 
# 'isRasterLayer', 'isSceneLayer', 'isTimeEnabled', 'isWebLayer', 
# 'listDefinitionQueries', 'listLabelClasses', 'listLayers', 'listTables', 
# 'longName', 'maxThreshold', 'metadata', 'minThreshold', 'name', 
# 'saveACopy', 'setSelectionSet', 'showLabels', 'supports', 'symbology', 
# 'time', 'transparency', 'updateConnectionProperties', 
# 'updateDefinitionQueries', 'visible']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Definitely does not support getDefinition.&amp;nbsp;But it has GetCimJSONString, which &lt;A href="https://duckduckgo.com/?q=%22getcimjsonstring%22+arcpy&amp;amp;ia=web" target="_blank" rel="noopener"&gt;only appears to be documented&lt;/A&gt;&amp;nbsp;in&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/26476"&gt;@SamSzotkowski&lt;/a&gt;&amp;nbsp;'s post&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/how-to-access-layer-properties-from-a/td-p/1191018" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. (That exact query in Google will yield the same post, as well as site that is actually AliExpress)&lt;/P&gt;&lt;P&gt;He writes, as I have also found, that instead of getting a layer object, we get a mappinglayer object. I &lt;A href="https://pro.arcgis.com/search/?q=MappingLayerObject&amp;amp;p=0&amp;amp;language=en&amp;amp;product=arcgis-pro&amp;amp;version=pro3.1&amp;amp;n=15&amp;amp;collection=help" target="_blank" rel="noopener"&gt;can't&lt;/A&gt; find any &lt;A href="https://pro.arcgis.com/search/?q=mappinglayer&amp;amp;p=0&amp;amp;language=en&amp;amp;product=arcgis-pro&amp;amp;version=pro3.1&amp;amp;n=15&amp;amp;collection=help" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;'''ATBX'''
inFCs = GetParameter(2)
arcpy.AddMessage(type(inFCs))
# &amp;lt;class 'list'&amp;gt;
arcpy.AddMessage(type(inFCs[0]))
# &amp;lt;class 'arcpy._mp.Layer'&amp;gt;
return

'''PYT'''
arcpy.AddMessage(type(parameters[2].value))
#&amp;lt;class 'geoprocessing value table object'&amp;gt;
arcpy.AddMessage(type(parameters[2].value.GetTrueValue(0,0)))
#&amp;lt;class 'MappingLayerObject'&amp;gt;

# I also checked with .GetTrueRow(0), etc.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So uh. &lt;STRONG&gt;What is a mappinglayer and where is anything written down about it?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What about a python toolbox causes a multivalue FeatureLayer parameter to be considered a value table, and the features within to be "MappingLayer"s instead of normal layers?&lt;STRONG&gt; And seriously, why is this not written down anywhere? &lt;/STRONG&gt;Why is this not mentioned on the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm" target="_blank" rel="noopener"&gt;CIM Access Documentation&lt;/A&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like, cool, I guess I can rewrite the code to use JSON instead of the CIM object. But it would have been&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;great&lt;/STRONG&gt;&lt;/EM&gt; to have been warned about this beforehand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 23:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335214#M68846</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-10-04T23:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: CIM Access: Layer doesn't support "getDefinition", is actually a MappingLayer (undocumented).</title>
      <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335554#M68861</link>
      <description>&lt;P&gt;Interesting...&lt;/P&gt;&lt;P&gt;Just a quick test:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# -*- coding: utf-8 -*-

import arcpy
import json

class Toolbox(object):
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "Toolbox"
        self.alias = "toolbox"

        # List of tool classes associated with this toolbox
        self.tools = [Tool]


def msg(txt=""):
    arcpy.AddMessage(str(txt))


class Tool(object):
    def __init__(self):
        self.label = "Tool"

    def getParameterInfo(self):
        return [
            arcpy.Parameter(name="p0", displayName="Layer", datatype="GPFeatureLayer"),
            arcpy.Parameter(name="p1", displayName="Layer Multi", datatype="GPFeatureLayer", multiValue=True),
            ]


    def execute(self, parameters, messages):
        # print parameter types
        for p in parameters:
            msg(f"parameter name: {p.displayName}")
            msg(f"\tparameter value: {p.value}")
            msg(f"\tvalue type: {type(p.value)}")
            if p.multiValue:
                msg(f"\ttype of first value: {type(p.value.GetTrueValue(0,0))}")

        # get the actual arcpy.mp.Layer object
        mapping_layer = parameters[0].value
        layer = arcpy.mp.ArcGISProject("current").activeMap.listLayers(mapping_layer.name)[0]

        # examine similarities and differences between arcpy.mp.Layer and MappingLayerObject
        l_dir = set(dir(layer))
        ml_dir = set(dir(mapping_layer))

        msg("Available in both:")
        for a in sorted(l_dir.intersection(ml_dir)):
            msg(f"\t{a}")
        
        msg("Not available in MappingLayerObject:")
        for a in sorted(l_dir - ml_dir):
            msg(f"\t{a}")

        msg("Not available in arcpy.mp.Layer:")
        for a in sorted(ml_dir - l_dir):
            msg(f"\t{a}")

        # get the MappingLayerObject's CIM
        d = json.loads(mapping_layer.GetCimJSONString())
        msg("GetCimJSONString keys:")
        for k in sorted(d.keys()):
            msg(f"\t{k}")

        # try playing with it (doesn't work)
        d["visibility"] = False
        mapping_layer.SetCimJSONString(json.dumps(d))

        # try manipulating the cim (this works)
        cim = layer.getDefinition("V3")
        cim.visibility = False
        layer.setDefinition(cim)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1696534066408.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/82422iC004C851067C8CA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1696534066408.png" alt="JohannesLindner_0-1696534066408.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;parameter name: Layer&lt;BR /&gt;    parameter value: &amp;lt;MappingLayerObject object at 0x0000020F36A80F60&amp;gt;&lt;BR /&gt;    value type: &amp;lt;class 'MappingLayerObject'&amp;gt;&lt;BR /&gt;parameter name: Layer Multi&lt;BR /&gt;    parameter value: TestPoints&lt;BR /&gt;    value type: &amp;lt;class 'geoprocessing value table object'&amp;gt;&lt;BR /&gt;    type of first value: &amp;lt;class 'MappingLayerObject'&amp;gt;&lt;BR /&gt;Available in both:&lt;BR /&gt;    URI&lt;BR /&gt;    __class__&lt;BR /&gt;    __delattr__&lt;BR /&gt;    __dir__&lt;BR /&gt;    __doc__&lt;BR /&gt;    __eq__&lt;BR /&gt;    __format__&lt;BR /&gt;    __ge__&lt;BR /&gt;    __getattribute__&lt;BR /&gt;    __gt__&lt;BR /&gt;    __hash__&lt;BR /&gt;    __init__&lt;BR /&gt;    __init_subclass__&lt;BR /&gt;    __le__&lt;BR /&gt;    __lt__&lt;BR /&gt;    __ne__&lt;BR /&gt;    __new__&lt;BR /&gt;    __reduce__&lt;BR /&gt;    __reduce_ex__&lt;BR /&gt;    __repr__&lt;BR /&gt;    __setattr__&lt;BR /&gt;    __sizeof__&lt;BR /&gt;    __str__&lt;BR /&gt;    __subclasshook__&lt;BR /&gt;    brightness&lt;BR /&gt;    connectionProperties&lt;BR /&gt;    contrast&lt;BR /&gt;    dataSource&lt;BR /&gt;    definitionQuery&lt;BR /&gt;    disableTime&lt;BR /&gt;    enableTime&lt;BR /&gt;    extrusion&lt;BR /&gt;    getSelectionSet&lt;BR /&gt;    is3DLayer&lt;BR /&gt;    isBasemapLayer&lt;BR /&gt;    isBroken&lt;BR /&gt;    isFeatureLayer&lt;BR /&gt;    isGroupLayer&lt;BR /&gt;    isNetworkAnalystLayer&lt;BR /&gt;    isNetworkDatasetLayer&lt;BR /&gt;    isRasterLayer&lt;BR /&gt;    isSceneLayer&lt;BR /&gt;    isTimeEnabled&lt;BR /&gt;    isWebLayer&lt;BR /&gt;    listDefinitionQueries&lt;BR /&gt;    listLabelClasses&lt;BR /&gt;    listLayers&lt;BR /&gt;    listTables&lt;BR /&gt;    longName&lt;BR /&gt;    maxThreshold&lt;BR /&gt;    metadata&lt;BR /&gt;    minThreshold&lt;BR /&gt;    name&lt;BR /&gt;    saveACopy&lt;BR /&gt;    setSelectionSet&lt;BR /&gt;    showLabels&lt;BR /&gt;    supports&lt;BR /&gt;    symbology&lt;BR /&gt;    time&lt;BR /&gt;    transparency&lt;BR /&gt;    updateConnectionProperties&lt;BR /&gt;    updateDefinitionQueries&lt;BR /&gt;    visible&lt;BR /&gt;Not available in MappingLayerObject:&lt;BR /&gt;    __dict__&lt;BR /&gt;    __from_scripting_arc_object__&lt;BR /&gt;    __module__&lt;BR /&gt;    __weakref__&lt;BR /&gt;    _arc_object&lt;BR /&gt;    getDefinition&lt;BR /&gt;    setDefinition&lt;BR /&gt;    updateLayerFromJSON&lt;BR /&gt;Not available in arcpy.mp.Layer:&lt;BR /&gt;    GetCimJSONString&lt;BR /&gt;    SetCimJSONString&lt;BR /&gt;    UpdateLayerFromJSON&lt;BR /&gt;    _XML&lt;BR /&gt;    _id&lt;BR /&gt;    _pUnk&lt;BR /&gt;    isLayerSame&lt;BR /&gt;GetCimJSONString keys:&lt;BR /&gt;    allowDrapingOnIntegratedMesh&lt;BR /&gt;    autoGenerateFeatureTemplates&lt;BR /&gt;    blendingMode&lt;BR /&gt;    description&lt;BR /&gt;    displayCacheType&lt;BR /&gt;    displayFiltersType&lt;BR /&gt;    enableDisplayFilters&lt;BR /&gt;    expanded&lt;BR /&gt;    featureBlendingMode&lt;BR /&gt;    featureCacheType&lt;BR /&gt;    featureElevationExpression&lt;BR /&gt;    featureTable&lt;BR /&gt;    featureTemplates&lt;BR /&gt;    htmlPopupEnabled&lt;BR /&gt;    labelClasses&lt;BR /&gt;    layerElevation&lt;BR /&gt;    layerType&lt;BR /&gt;    maxDisplayCacheAge&lt;BR /&gt;    metadataURI&lt;BR /&gt;    name&lt;BR /&gt;    popupInfo&lt;BR /&gt;    refreshRate&lt;BR /&gt;    refreshRateUnit&lt;BR /&gt;    renderer&lt;BR /&gt;    scaleSymbols&lt;BR /&gt;    selectable&lt;BR /&gt;    serviceLayerID&lt;BR /&gt;    showLegends&lt;BR /&gt;    showPopups&lt;BR /&gt;    snappable&lt;BR /&gt;    sourceModifiedTime&lt;BR /&gt;    symbolLayerDrawing&lt;BR /&gt;    type&lt;BR /&gt;    uRI&lt;BR /&gt;    useSourceMetadata&lt;BR /&gt;    visibility&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;multiValue doesn't seem to be the culprit. The single parameter value is a MappingLayerObject, too.&lt;/LI&gt;&lt;LI&gt;they have many similarities to "normal" layers. The significant differences:&lt;UL&gt;&lt;LI&gt;the way to access the cim properties (Python objects vs JSON)&lt;/LI&gt;&lt;LI&gt;MappingObjectLayer doesn't seem to be derived from an arcobject (it doesn't have the _arcobject property). Most arcpy classes are just wrappers around ArcObjects, MappingLayerObject might be different. I did not want to dive into the arcpy source code, though...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;You can get the cim properties from the JSON, but setting them to the MappingLayerObject didn't work (but I also didn't try to make it work...)&lt;/LI&gt;&lt;LI&gt;Your best bet is probably to use the name attribute to get the arcpy._mp.Layer from the active map like I did in line 43. Manipulating this object's cim does appear to work.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 19:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335554#M68861</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-10-05T19:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: CIM Access: Layer doesn't support "getDefinition", is actually a MappingLayer (undocumented).</title>
      <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335562#M68862</link>
      <description>&lt;P&gt;Yeah, the multi-value complaint is extraneous; I just hate that it returns a value table instead a list like multivalue parameters do in ATBXs.&lt;/P&gt;&lt;P&gt;Just very confused as to why PYTs don't bring in Layer objects from parameters. (and why it's not documented!?)&lt;/P&gt;&lt;P&gt;In this case, I just needed to read the CIM, but I shudder at the idea of updating it this way.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 20:08:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335562#M68862</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-10-05T20:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: CIM Access: Layer doesn't support "getDefinition", is actually a MappingLayer (undocumented).</title>
      <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335706#M68874</link>
      <description>&lt;P&gt;Seeing as it's not documented, I'd wager it's not something that users are meant to interact with. Might be an oversight/bug.&lt;/P&gt;&lt;P&gt;Just get the arcpy._mp.Layer object from the map using the MappingLayerObject.name property and do your CIM manipulations like normal.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 09:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1335706#M68874</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-10-06T09:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: CIM Access: Layer doesn't support "getDefinition", is actually a MappingLayer (undocumented).</title>
      <link>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1340615#M69018</link>
      <description>&lt;P&gt;Indeed I think one of the "intended" ways for you to alter layer properties in a PYT is via the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/post-execution-validation.htm" target="_self"&gt;postExecute method&lt;/A&gt;, matching the Layer in the active map to the tool's input by name, though even in their example snippet they make the shaky assumption that all layers have unique names (best practice though it may be).&lt;/P&gt;&lt;P&gt;I'd hoped when I saw they added this method in 3.0 that it meant we no longer had to do black magic to alter layer properties, but c'est la vie.&amp;nbsp; In truth I don't understand what the point of postExecute is, as far as I know everything you can do in there you can do in regular execute.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 18:33:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cim-access-layer-doesn-t-support-quot/m-p/1340615#M69018</guid>
      <dc:creator>SamSzotkowski</dc:creator>
      <dc:date>2023-10-23T18:33:36Z</dc:date>
    </item>
  </channel>
</rss>

