<?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: Change/Edit Version within Geoprocessing Tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750022#M57929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After you create a version and before you change it try creating a connection to it.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CreateDatabaseConnection_management&lt;SPAN style="color: #3b474d; background-color: #ffffff; font-size: 22px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2019 15:50:35 GMT</pubDate>
    <dc:creator>MatthewDriscoll</dc:creator>
    <dc:date>2019-04-11T15:50:35Z</dc:date>
    <item>
      <title>Change/Edit Version within Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750021#M57928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run my&amp;nbsp;script in the Python window in ArcGIS Pro 2.3.2 all changes are made in the version specified. When I run the same script as a geoprocessing tool all changes are made to DEFAULT. Is it possible to create a geoprocessing tool that &lt;SPAN style="text-decoration: underline;"&gt;changes the version and edits within that version?&amp;nbsp;&lt;/SPAN&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;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; glob

workOrder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&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="comment token"&gt;# Create version&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:/Users/azumwalt.UECOOP/AppData/Roaming/ESRI/Desktop10.4/ArcCatalog/ElectricModel - azumwalt.sde"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DEFAULT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; workOrder&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"_TEST"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PUBLIC"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ChangeVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Consumer_SQL02"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'TRANSACTIONAL'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DBO."&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;workOrder&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"_TEST"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750021#M57928</guid>
      <dc:creator>AdelaideZumwalt1</dc:creator>
      <dc:date>2021-12-12T07:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change/Edit Version within Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750022#M57929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After you create a version and before you change it try creating a connection to it.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CreateDatabaseConnection_management&lt;SPAN style="color: #3b474d; background-color: #ffffff; font-size: 22px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 15:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750022#M57929</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2019-04-11T15:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change/Edit Version within Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750023#M57930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I'll try that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 00:55:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-edit-version-within-geoprocessing-tool/m-p/750023#M57930</guid>
      <dc:creator>AdelaideZumwalt1</dc:creator>
      <dc:date>2019-04-12T00:55:24Z</dc:date>
    </item>
  </channel>
</rss>

