<?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: Adding a feature layer via Geodatabase in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830309#M3262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mark. We've added this as an issue for our next release after 2.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 16:40:47 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2018-05-16T16:40:47Z</dc:date>
    <item>
      <title>Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830308#M3261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the following code to open a connection to a feature server and adding a feature layer to the current map:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; serviceUrl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Furl-of-feature-server%2FFeatureServer" target="_blank"&gt;http://url-of-feature-server/FeatureServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layerId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; map &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;

&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; geoDb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Geodatabase&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;ServiceConnectionProperties&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;serviceUrl&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="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; defNames &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geoDb&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetDefinitions&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureClassDefinition&lt;SPAN class="operator token"&gt;&amp;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="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Select&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;def &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; def&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetName&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;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToArray&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; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;int&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Parse&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Assert&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;defNames&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Length &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;defNames&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Length &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureClass &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geoDb&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OpenDataset&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureClass&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;defNames&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;id&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="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&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;featureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDisplayCacheType&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DisplayCacheType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDisplayCacheMaxAge&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TimeSpan&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Zero&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="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp; &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;/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;P&gt;&lt;/P&gt;&lt;P&gt;This works fine the 1st time this code gets executed.&amp;nbsp; If the feature server has N feature layers then defNames gets N definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the feature server gains a new layer, one would expect that the next time this code gets executed defNames would have N + 1 items.&amp;nbsp; However it still returns N definitions.&amp;nbsp; Using Fiddler, I can see that ArcGIS performs HTTP requests (to get feature definitions, metadata, etc.) the 1st time the Geodatabase object is created.&amp;nbsp; Subsequent creations of new Geodatabase objects (using the same service URL) does not make any other HTTP requests, even when geoDb object was disposed via "using", as if it was being cached by ArcGIS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ensure that every time I create a new Geodatabase object that it has the most recent feature definitions and ArcGIS doesn't cache anything.&amp;nbsp; How would one do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally, I've noticed that SetDisplayCacheType(DisplayCacheType.None) does not seem to apply or update the layer's properties (checking via Layer-&amp;gt;Properties-&amp;gt;Cache).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:01:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830308#M3261</guid>
      <dc:creator>MarkGumban</dc:creator>
      <dc:date>2021-12-12T10:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830309#M3262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mark. We've added this as an issue for our next release after 2.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 16:40:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830309#M3262</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2018-05-16T16:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830310#M3263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Charles. Do you have any recommendations for work arounds in the meantime? Is there any way to force Pro to refresh the available layers in a service? Are there any flags that we could set in the service/layer metadata?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 01:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830310#M3263</guid>
      <dc:creator>JamesKerr</dc:creator>
      <dc:date>2018-05-17T01:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830311#M3264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James, unfortunately, there is no workaround.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 17:09:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830311#M3264</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2018-05-17T17:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830312#M3265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Charles. I'm just checking up on this to see if you have any update on a fix for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 10:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830312#M3265</guid>
      <dc:creator>JamesKerr</dc:creator>
      <dc:date>2018-10-16T10:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830313#M3266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will be fixed in Pro 2.3, expected early 2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 15:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830313#M3266</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2018-10-16T15:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830314#M3267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 15:46:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/830314#M3267</guid>
      <dc:creator>JamesKerr</dc:creator>
      <dc:date>2018-10-16T15:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a feature layer via Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/1097683#M7117</link>
      <description>&lt;P&gt;When the cache type is set in code, is the Cache property tab supposed to update?&amp;nbsp; When I set cache type to None (or any other value), the UI has "Clear cache when the session ends" selected.&amp;nbsp; Also, ArcGIS Pro doesn't seem to use the value set via code, instead it's using the value seen in the UI.&lt;/P&gt;&lt;P&gt;ArcGIS Pro 2.7.3 is being used.&lt;/P&gt;&lt;P&gt;featureLayer.SetDisplayCacheType(ArcGIS.Core.CIM.DisplayCacheType.None);&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-09-13_10-50-08.jpg" style="width: 621px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22864i3B569DFCACCC4241/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-09-13_10-50-08.jpg" alt="2021-09-13_10-50-08.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 16:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-feature-layer-via-geodatabase/m-p/1097683#M7117</guid>
      <dc:creator>JeffRogholt</dc:creator>
      <dc:date>2021-09-13T16:02:54Z</dc:date>
    </item>
  </channel>
</rss>

