<?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: Open SDE Geodatabase with WorkspaceConnectionString in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083381#M6949</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/485664"&gt;@Zoggo&lt;/a&gt;,&amp;nbsp;The Pro SDK doesn’t have a method to open/connect the geodatabase from a workspace connection string. I am curious to know why you use CIMFeatureDatasetDataConnection. Can you use &lt;STRONG&gt;FeatureLayer.GetFeatureClass().GetDatastore() as Geodatabase&lt;/STRONG&gt; instead?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 02:52:46 GMT</pubDate>
    <dc:creator>Aashis</dc:creator>
    <dc:date>2021-07-28T02:52:46Z</dc:date>
    <item>
      <title>Open SDE Geodatabase with WorkspaceConnectionString</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083000#M6943</link>
      <description>&lt;P&gt;I have a WorkspaceConnectionString from CIMFeatureDatasetDataConnection looking like that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zoggo_0-1627385415861.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19417i297273AF13CDE0F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zoggo_0-1627385415861.png" alt="Zoggo_0-1627385415861.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this ConnectionString I like to open a Enterprise Geodatabase (SDE):&lt;/P&gt;&lt;P&gt;GDB = new Geodatabase(new DatabaseConnectionProperties(EnterpriseDatabaseType.SQLServer)&lt;/P&gt;&lt;P&gt;What is the best way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 11:33:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083000#M6943</guid>
      <dc:creator>Zoggo</dc:creator>
      <dc:date>2021-07-27T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Open SDE Geodatabase with WorkspaceConnectionString</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083381#M6949</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/485664"&gt;@Zoggo&lt;/a&gt;,&amp;nbsp;The Pro SDK doesn’t have a method to open/connect the geodatabase from a workspace connection string. I am curious to know why you use CIMFeatureDatasetDataConnection. Can you use &lt;STRONG&gt;FeatureLayer.GetFeatureClass().GetDatastore() as Geodatabase&lt;/STRONG&gt; instead?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 02:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083381#M6949</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2021-07-28T02:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Open SDE Geodatabase with WorkspaceConnectionString</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083396#M6951</link>
      <description>&lt;P&gt;I'm working with a linear referencing layer (Route Feature Layer). The event table is in a filegeodatabase and the route features is in a enterprise geodatabase. If I use FeatureLayer.GetFeatureClass().GetDatastore() as Geodatabase I only get the&amp;nbsp; filegeodatabase workspace from the table but I need the enterprise geodatabase workspace from the route features.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 05:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1083396#M6951</guid>
      <dc:creator>Zoggo</dc:creator>
      <dc:date>2021-07-28T05:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Open SDE Geodatabase with WorkspaceConnectionString</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1085418#M6970</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/485664"&gt;@Zoggo&lt;/a&gt;&amp;nbsp;, A workaround to access the route feature class’s geodatabase from route event layer&lt;/P&gt;&lt;LI-CODE lang="c"&gt;      // Get all layers from the map
      IReadOnlyList&amp;lt;Layer&amp;gt; layers = MapView.Active.Map.GetLayersAsFlattenedList();
      
      // Assuming route event layer is the first layer of map
      CIMRouteEventDataConnection connection = layers[0].GetDataConnection() as CIMRouteEventDataConnection;
      
      // Get connection to the route feature class
      CIMDataConnection routeFeatureClassConnection = connection.RouteFeatureClass ;
      
      // Create a feature layer using the route feature class connection
      FeatureLayer featureLayer = LayerFactory.Instance.CreateLayer(routeFeatureClassConnection, MapView.Active.Map, layerName: "RouteFeatureClass" ) as FeatureLayer;
      
      // Use feature layer to access the geodatabase
      Geodatabase geodatabase = featureLayer.GetFeatureClass().GetDatastore() as Geodatabase;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 18:11:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1085418#M6970</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2021-08-03T18:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Open SDE Geodatabase with WorkspaceConnectionString</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1119482#M7377</link>
      <description>&lt;P&gt;Basically it works. But the solution isn't nice. Because it adds the FeatureClass to the map. That's not wanted and very slow. Is there no other way without adding the layer to the map?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 10:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-sde-geodatabase-with/m-p/1119482#M7377</guid>
      <dc:creator>Zoggo</dc:creator>
      <dc:date>2021-11-23T10:26:26Z</dc:date>
    </item>
  </channel>
</rss>

