<?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: version delete denied, version in used in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823488#M2930</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting versions can be a tricky process. &amp;nbsp;You have to ensure that all outstanding Rows, Tables, Feature Classes, Feature Datasets, etc. have been disposed. &amp;nbsp;Read a description about this &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#resource-management"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that Map has a method called &lt;A href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic11861.html"&gt;ChangeVersion()&lt;/A&gt;. &amp;nbsp;You could try using this to switch the layers in the map rather than the&amp;nbsp;geoprocessing tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2019 15:51:12 GMT</pubDate>
    <dc:creator>RichRuh</dc:creator>
    <dc:date>2019-09-11T15:51:12Z</dc:date>
    <item>
      <title>version delete denied, version in used</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823487#M2929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a button that changes some layers to a specific version. Once a workflow is completed, those layers are then reconcile and post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are no conflict, we then move those layers back to default using the tool as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;IGPResult&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; gpResult = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; ArcGIS.Desktop.Framework.Threading.Tasks.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small; font-family: Consolas; "&gt;QueuedTask&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;.Run(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;async&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; () =&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; parameters = &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small; font-family: Consolas; "&gt;Geoprocessing&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;.MakeValueArray(constructLayer, &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"TRANSACTIONAL"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;, newVersion.GetName());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; gpResult = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small; font-family: Consolas; "&gt;Geoprocessing&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;.ExecuteToolAsync(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"ChangeVersion_management"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;, parameters);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are no issues with the reconciling, we will then delete the version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jobVersion.Delete()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOWEVER, I kept receiving the following message when I the Delete() method is called&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Operation not allowed because the version is in use."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The version is only used by me. If I restart pro then manually delete the version, it works fine. Can someone please advise what the approach to deleting version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 06:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823487#M2929</guid>
      <dc:creator>VictorTey</dc:creator>
      <dc:date>2019-09-11T06:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: version delete denied, version in used</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823488#M2930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting versions can be a tricky process. &amp;nbsp;You have to ensure that all outstanding Rows, Tables, Feature Classes, Feature Datasets, etc. have been disposed. &amp;nbsp;Read a description about this &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#resource-management"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that Map has a method called &lt;A href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic11861.html"&gt;ChangeVersion()&lt;/A&gt;. &amp;nbsp;You could try using this to switch the layers in the map rather than the&amp;nbsp;geoprocessing tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 15:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823488#M2930</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2019-09-11T15:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: version delete denied, version in used</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823489#M2931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On top Rich reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoprocessing async does not require to wrap with QueuedTask since it is&amp;nbsp;corased-grained async method which does not use arcpro main thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to below paper, only the MCT annotated fine-grained methods are required use this QueuedTask.&lt;/P&gt;&lt;P&gt;Below is the list of paper for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://proceedings.esri.com/library/userconf/devsummit-dc18/papers/dev-dc-20.pdf" title="http://proceedings.esri.com/library/userconf/devsummit-dc18/papers/dev-dc-20.pdf"&gt;http://proceedings.esri.com/library/userconf/devsummit-dc18/papers/dev-dc-20.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://proceedings.esri.com/library/userconf/devsummit-euro17/papers/devsummit-euro_40.pdf" title="http://proceedings.esri.com/library/userconf/devsummit-euro17/papers/devsummit-euro_40.pdf"&gt;http://proceedings.esri.com/library/userconf/devsummit-euro17/papers/devsummit-euro_40.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2019 04:15:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/version-delete-denied-version-in-used/m-p/823489#M2931</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-09-12T04:15:48Z</dc:date>
    </item>
  </channel>
</rss>

