<?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 Inserting CIMRowTemplate into SubTypeLayer does not work in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inserting-cimrowtemplate-into-subtypelayer-does/m-p/1343776#M10622</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I got a custom script which does create some CIMRowTemplates and tries to insert these into a CIMMapDefinition more specifically into a SubTypeLayer. Unfortunately the self generated CIMRowTemplate always seems to dissapear as soon as I import the .mapx file into ArcGIS Pro.&lt;/P&gt;&lt;P&gt;On the left side is the manipulated .mapx file and the self generated CIMRowTemplate 'tees-300er' (marked red). It seems almost identical to the default Feature Template '300er' directly above&lt;/P&gt;&lt;P&gt;On the right side you see the .mapx File after I imported it into ArcGIS Pro. The self created CIMRowTemplate just vanished.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="difference.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84546iFA7161457FF2DA48/image-size/large?v=v2&amp;amp;px=999" role="button" title="difference.PNG" alt="difference.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have absolutely no problem when creating CIM templates and importing them into 'regular' layers (non subtype layers).&lt;/P&gt;&lt;P&gt;The CIMRowTemplate JSON just looks fine, so I got the gut feeling that there is something not right behind the scenes. I got absolutely no clue why my template does not seem to be 'valid'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code looks approx like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cim_template = CIMRowTemplate()
# .. set some properties
cim_layer = layer.getDefinition("V3")
cim_layer.featureTemplates.append(cim_template)
layer.setDefinition(cim_layer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both .mapx files are attached. Somehow I could not upload the .mapx file type? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 13:06:25 GMT</pubDate>
    <dc:creator>marco_vertigis</dc:creator>
    <dc:date>2023-10-31T13:06:25Z</dc:date>
    <item>
      <title>Inserting CIMRowTemplate into SubTypeLayer does not work</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inserting-cimrowtemplate-into-subtypelayer-does/m-p/1343776#M10622</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I got a custom script which does create some CIMRowTemplates and tries to insert these into a CIMMapDefinition more specifically into a SubTypeLayer. Unfortunately the self generated CIMRowTemplate always seems to dissapear as soon as I import the .mapx file into ArcGIS Pro.&lt;/P&gt;&lt;P&gt;On the left side is the manipulated .mapx file and the self generated CIMRowTemplate 'tees-300er' (marked red). It seems almost identical to the default Feature Template '300er' directly above&lt;/P&gt;&lt;P&gt;On the right side you see the .mapx File after I imported it into ArcGIS Pro. The self created CIMRowTemplate just vanished.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="difference.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84546iFA7161457FF2DA48/image-size/large?v=v2&amp;amp;px=999" role="button" title="difference.PNG" alt="difference.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have absolutely no problem when creating CIM templates and importing them into 'regular' layers (non subtype layers).&lt;/P&gt;&lt;P&gt;The CIMRowTemplate JSON just looks fine, so I got the gut feeling that there is something not right behind the scenes. I got absolutely no clue why my template does not seem to be 'valid'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code looks approx like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cim_template = CIMRowTemplate()
# .. set some properties
cim_layer = layer.getDefinition("V3")
cim_layer.featureTemplates.append(cim_template)
layer.setDefinition(cim_layer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both .mapx files are attached. Somehow I could not upload the .mapx file type? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 13:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inserting-cimrowtemplate-into-subtypelayer-does/m-p/1343776#M10622</guid>
      <dc:creator>marco_vertigis</dc:creator>
      <dc:date>2023-10-31T13:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting CIMRowTemplate into SubTypeLayer does not work</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inserting-cimrowtemplate-into-subtypelayer-does/m-p/1343807#M10623</link>
      <description>&lt;P&gt;I just figured it out myself! I had to set the '&lt;SPAN&gt;autoGenerateFeatureTemplates' property to False before applying the cim definition to the layer. Then it worked. Just a bit confusing that I dont have to do this for 'regular' layers and only for sub type layers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;layer_definition.autoGenerateFeatureTemplates = False&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 13:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inserting-cimrowtemplate-into-subtypelayer-does/m-p/1343807#M10623</guid>
      <dc:creator>marco_vertigis</dc:creator>
      <dc:date>2023-10-31T13:48:04Z</dc:date>
    </item>
  </channel>
</rss>

