<?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: FeatureLayer.SetDefinition Broken? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840697#M3791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a simpler example.&amp;nbsp; SetDefinition doesn't do anything from what I can tell.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Test&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; def &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; CIMFeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DataConnection&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"my layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// name remains "my layer" Setdefinition has no discernable effect&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:15:52 GMT</pubDate>
    <dc:creator>KirkKuykendall</dc:creator>
    <dc:date>2021-12-12T10:15:52Z</dc:date>
    <item>
      <title>FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840696#M3790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would expect the following code to essentially clone the top layer in the map.&amp;nbsp; It does create a new featurelayer that points to the Uri, but calling SetDefinition has no discernible effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Test&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; def &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; CIMFeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; def&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DataConnection &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; CIMStandardDataConnection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; folder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; conn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WorkspaceConnectionString&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'='&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;conn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WorkspaceFactory &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; WorkspaceFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Shapefile&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;throw&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"test only works with shapefile layers"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Combine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;folder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; conn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Dataset &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"my layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// name remains "my layer" Setdefinition has no discernible effect&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840696#M3790</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2021-12-12T10:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840697#M3791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a simpler example.&amp;nbsp; SetDefinition doesn't do anything from what I can tell.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Test&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; def &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; CIMFeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DataConnection&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"my layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// name remains "my layer" Setdefinition has no discernable effect&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840697#M3791</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2021-12-12T10:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840698#M3792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get and Set definition are a transactional pair. That is, you have to "get" a layer's definition, change it, then "set" it (or commit it) back to the repository. Think of it like a record in a database. It has an id and some other identifier information. It cannot be shared. In your code above I would imagine that the layer in&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;MapView&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;]&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will have had its name changed to "my layer". Ditto for the code sample above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840698#M3792</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2017-02-22T16:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840699#M3793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I looked closer at your code. In retrospect, it looks like you may be overwriting your change. For&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;MapView&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;] 
to have been changed you would have needed to have updated its definition before the
set (on flayer). Either way, the key is you have to get a definition, change it, then 
set it back.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840699#M3793</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-12-12T10:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840700#M3794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying Charles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I open a .lyrx file in a text editor, I see that it contains a CIMLayerDocument, which has a list of CIMLayers (e.g. CIMFeatureLayer etc.)&amp;nbsp; When I choose to add data and select a .lyrx file behind the scenes Pro is turning definitions into layers.&amp;nbsp; I want to be able to do something similar.&amp;nbsp; Is this functionality exposed by the API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, I think Esri really needs to add another overload to LayerFactory.CreateLayer which accepts a CIMLayer definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, if there is a bug in SetDefinition, perhaps I could accomplish this once the bug is fixed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840700#M3794</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2017-02-23T15:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840701#M3795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use&amp;nbsp;LayerFactory.CreateLayer directly with the layer file....or....is that not doing what you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-and-add-a-layer-to-the-active-map"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-and-add-a-layer-to-the-active-map&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 17:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840701#M3795</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2017-02-23T17:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer.SetDefinition Broken?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840702#M3796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I resolved this by setting the URI of the definition to that of the newly created layer before applying.&lt;/P&gt;&lt;P&gt;Any known ill side-effects from doing this?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;def&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;URI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDefinition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;URI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
fLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDefinintion&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/featurelayer-setdefinition-broken/m-p/840702#M3796</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2021-12-12T10:15:57Z</dc:date>
    </item>
  </channel>
</rss>

