<?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 Retrieve current SDE version in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/retrieve-current-sde-version/m-p/196834#M5137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get the current SDE version, for example "SDE.DEFAULT" of the current workspace. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently using the following code, but it always returns "SDE.DEFAULT", even when I'm connected to another version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IWorkspace workspace = ((IDataset)ArcMap.Document.ActiveView.FocusMap.Layer[0]).Workspace; IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; String strVer = versionedWorkspace.DefaultVersion.VersionName;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using ArcObjects 9.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oli&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2012 16:54:44 GMT</pubDate>
    <dc:creator>OlivierVoyer</dc:creator>
    <dc:date>2012-08-03T16:54:44Z</dc:date>
    <item>
      <title>Retrieve current SDE version</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/retrieve-current-sde-version/m-p/196834#M5137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get the current SDE version, for example "SDE.DEFAULT" of the current workspace. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently using the following code, but it always returns "SDE.DEFAULT", even when I'm connected to another version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IWorkspace workspace = ((IDataset)ArcMap.Document.ActiveView.FocusMap.Layer[0]).Workspace; IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; String strVer = versionedWorkspace.DefaultVersion.VersionName;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using ArcObjects 9.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oli&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 16:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/retrieve-current-sde-version/m-p/196834#M5137</guid>
      <dc:creator>OlivierVoyer</dc:creator>
      <dc:date>2012-08-03T16:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve current SDE version</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/retrieve-current-sde-version/m-p/196835#M5138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I - already - found the solution &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IWorkspace workspace = ((IDataset)ArcMap.Document.ActiveView.FocusMap.Layer[0]).Workspace; IVersion version = (IVersion)workspace; String strVer = version.VersionName;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 17:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/retrieve-current-sde-version/m-p/196835#M5138</guid>
      <dc:creator>OlivierVoyer</dc:creator>
      <dc:date>2012-08-03T17:05:58Z</dc:date>
    </item>
  </channel>
</rss>

