<?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: Trouble exporting from model builder to python script in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/trouble-exporting-from-model-builder-to-python/m-p/707177#M2351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to make a list of your datasets and loop through them. I don't think python will be able to recognize multiple inputs through one copy tool. Something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
sde1 = #your source connection
sde2 = #your output connection
arcpy.env.workspace = sde1
datasetList = [dataset1, dataset2,...]
for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Copy_management(dataset, sde2+dataset)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to get ALL the datasets from an SDE GDB then you can also just do&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;datasetList = arcpy.ListDatasets("", "Feature")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:42:57 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2021-12-12T05:42:57Z</dc:date>
    <item>
      <title>Trouble exporting from model builder to python script</title>
      <link>https://community.esri.com/t5/transportation-questions/trouble-exporting-from-model-builder-to-python/m-p/707176#M2350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Kreeves11674&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I built a model that would copy mutiple feature datasets from one ArcSDE to another. In the model, everything worked fine. It would copy all six (6) feature datasets over. But once I exported the model to a python script, and ran it, it would only copy over the first feature dataset that was listed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something that I missed in the export process?&amp;nbsp; I am new to model builder and python, so please bear with me.&amp;nbsp; There are supposed to be 6 datasets to be copied, but the attached screenshot only shows one of them in the python script.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 18:35:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/trouble-exporting-from-model-builder-to-python/m-p/707176#M2350</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-02T18:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble exporting from model builder to python script</title>
      <link>https://community.esri.com/t5/transportation-questions/trouble-exporting-from-model-builder-to-python/m-p/707177#M2351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to make a list of your datasets and loop through them. I don't think python will be able to recognize multiple inputs through one copy tool. Something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
sde1 = #your source connection
sde2 = #your output connection
arcpy.env.workspace = sde1
datasetList = [dataset1, dataset2,...]
for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Copy_management(dataset, sde2+dataset)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to get ALL the datasets from an SDE GDB then you can also just do&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;datasetList = arcpy.ListDatasets("", "Feature")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/trouble-exporting-from-model-builder-to-python/m-p/707177#M2351</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-12T05:42:57Z</dc:date>
    </item>
  </channel>
</rss>

