<?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: Python Toolbox Copy Feature Class in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725570#M56215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not all that familiar with the inner workings of a Python toolbox, but my first guess is you'd need to be able to set that egbd as the workspace, and get a list of featues from that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/using-environment-settings.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/using-environment-settings.htm"&gt;Using environment settings in Python—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/functions/listfeatureclasses.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/functions/listfeatureclasses.htm"&gt;ListFeatureClasses—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2020 13:42:42 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2020-08-28T13:42:42Z</dc:date>
    <item>
      <title>Python Toolbox Copy Feature Class</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725569#M56214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a Python toolbox that will let the user select an enterprise geodatabase, select layers from that geodatabase, and copy them to a local geodatabase.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have three parameters; the first is the enterprise geodatabase, the second is a multi-value list of the feature classes to be copied, and the third is the target geodatabase.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get the second parameter to take the database from the first parameter so the user can only get feature classes from that geodatabase?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 12:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725569#M56214</guid>
      <dc:creator>MarkBinder</dc:creator>
      <dc:date>2020-08-28T12:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Copy Feature Class</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725570#M56215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not all that familiar with the inner workings of a Python toolbox, but my first guess is you'd need to be able to set that egbd as the workspace, and get a list of featues from that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/using-environment-settings.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/using-environment-settings.htm"&gt;Using environment settings in Python—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/functions/listfeatureclasses.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/functions/listfeatureclasses.htm"&gt;ListFeatureClasses—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:42:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725570#M56215</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-08-28T13:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Copy Feature Class</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725571#M56216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not not sure what you are asking is possible. Think about what you are asking, are there &lt;SPAN style="text-decoration: underline;"&gt;any&lt;/SPAN&gt; system geo-processing tools that as a first parameter take only a workspace and a second parameter becomes a "workspace aware" FeatureClass. The answer is no. When you use any existing tool you don't go through that two stage step which you are asking for. You typically drill down to the FeatureClass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I explored the parameter properties&amp;nbsp;&lt;EM&gt;defaultEnvironmentName&lt;/EM&gt; and&amp;nbsp;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;EM&gt;parameterDependencies&lt;/EM&gt; and could not create the experience you are asking for, then when I thought about it I realised no ESRI system tool does what you are asking for...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2020 00:37:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725571#M56216</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2020-08-29T00:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Copy Feature Class</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725572#M56217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Per &lt;A href="https://community.esri.com/migrated-users/4563" target="_blank"&gt;Duncan Hornby&lt;/A&gt;‌ comment&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;You typically drill down to the FeatureClass.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could you have 2 parameters, the first being a multiValue list of items to copy, and the second is the save location?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getParameterInfo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""Define parameter definitions"""&lt;/SPAN&gt;

        gdbFeatures &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Parameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
            displayName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Select items to copy"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"gdbFeatures"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            datatype &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DEFeatureClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DEFeatureDataset"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DETable"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
            parameterType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Required"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            direction &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Input"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            multiValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        gdbSave &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Parameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
            displayName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Select save location (geodatabase)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"gdbSelect"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            datatype &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DEWorkspace"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# perhaps DEGeoDataServer for enterprise server ?&lt;/SPAN&gt;
            parameterType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Required"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            direction &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Input"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;gdbFeatures&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gdbSave&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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725572#M56217</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T07:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Copy Feature Class</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725573#M56218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the feedback. I agree, I don't think what I was trying to do will work. I'll have to just have the list of layers and the target geodatabase to store them in. I'm going to see if I can have an option for the user to save the list of layers and import an existing list so they don't have to select all of the layers each time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all of your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2020 16:27:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-copy-feature-class/m-p/725573#M56218</guid>
      <dc:creator>MarkBinder</dc:creator>
      <dc:date>2020-08-30T16:27:31Z</dc:date>
    </item>
  </channel>
</rss>

