<?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: Create output folder navigation option in python tool in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196526#M57880</link>
    <description>&lt;P&gt;You are right. I could do them as one parameter to navigate to the folder and one to provide a new name. It is just easier to do it in one parameter. For example, the copy geoprocessing function allows you to select a folder and a new name for the copied feature.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 19:28:32 GMT</pubDate>
    <dc:creator>WadeWall</dc:creator>
    <dc:date>2022-07-27T19:28:32Z</dc:date>
    <item>
      <title>Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196296#M57838</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have been creating python tools within a python toolbox in Arcgis Pro 2.8, but can't figure out how to add a folder navigation icon so that, when the user selects the output the location, they can navigate there.&lt;/P&gt;&lt;P&gt;Thanks for any information.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 12:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196296#M57838</guid>
      <dc:creator>WadeWall</dc:creator>
      <dc:date>2022-07-27T12:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196396#M57857</link>
      <description>&lt;P&gt;Here's a simple getParameterInfo() method for one of my tools that accepts a directory path as input. The "folder navigation icon" appears in the Arc Pro GUI when the tool is opened.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameter-data-types-in-a-python-toolbox.htm" target="_self"&gt;The docs&lt;/A&gt; for Parameter definition and data types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def getParameterInfo():
    input_directory = Parameter(
        displayName = 'Input Project Folder',
        name = 'input_directory',
        datatype = 'DEWorkspace',
        parameterType = 'Required',
        direction = 'Input')

    input_directory.filter.list = ['File System']

    return [input_directory]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:46:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196396#M57857</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-27T15:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196418#M57862</link>
      <description>&lt;P&gt;Thanks for the reply. I actually have that working on the input side. What I want to do is be able to browse to an outfolder and type a new output name. We can do this using some of the native ArcGIS tools, I just can't figure out how to do it with a python toolbox. Here is an example:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;outfile = arcpy.Parameter(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; displayName="outfile",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name="outFile",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; datatype="GPString",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parameterType="Required",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; direction="Output")&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It may be that I am using "GPString" and so I have to hard code the path. I am just not sure.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:10:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196418#M57862</guid>
      <dc:creator>WadeWall</dc:creator>
      <dc:date>2022-07-27T16:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196442#M57865</link>
      <description>&lt;P&gt;Alright I think I understand what you're trying for.&lt;/P&gt;&lt;P&gt;Interesting question - I would handle this by having 2 inputs like in the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-feature-class.htm" target="_self"&gt;Create Feature Class tool&lt;/A&gt;. One field to select output directory/workspace. One field of free text to define the output name. And then handle the validation and pathing etc in code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But that's not a direct solution to what you're asking. Can you post an example ESRI tool which has the desired behavior? Now I'm curious about this too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think the "&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameters-in-a-python-toolbox.htm" target="_self"&gt;derived outputs&lt;/A&gt;" section of the docs is the right direction? The docs aren't clear to me how that's used though...&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196442#M57865</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-27T16:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196526#M57880</link>
      <description>&lt;P&gt;You are right. I could do them as one parameter to navigate to the folder and one to provide a new name. It is just easier to do it in one parameter. For example, the copy geoprocessing function allows you to select a folder and a new name for the copied feature.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 19:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196526#M57880</guid>
      <dc:creator>WadeWall</dc:creator>
      <dc:date>2022-07-27T19:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196536#M57882</link>
      <description>&lt;P&gt;Looking at the 2 tools we mentioned, Create Feature Class and Copy, they have different geoprocessing data types for their input/output.&lt;/P&gt;&lt;P&gt;Create Feature Class uses Workspace;Feature Dataset and String (the same as my solution).&lt;/P&gt;&lt;P&gt;Copy uses the Data Element type for both input and output.&lt;/P&gt;&lt;P&gt;Maybe if you used that type for your Parameter it would give the desired behavior?&lt;BR /&gt;&lt;BR /&gt;Something like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def getParameterInfo():
    input_directory = Parameter(
        displayName = 'Input Data',
        name = 'input_data',
        datatype = 'DEType',
        parameterType = 'Required',
        direction = 'Input')

    input_directory = Parameter(
        displayName = 'Output Data',
        name = 'output_data',
        datatype = 'DEType',
        parameterType = 'Required',
        direction = 'Input')

    return [input_data, output_data]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Curious to know if this works.&lt;/P&gt;&lt;P&gt;Also curious why ESRI has the actual tools structured in different ways. The "Copy" tool cannot copy between different workspaces e.g. Folder -&amp;gt; GDB.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 19:52:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1196536#M57882</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-27T19:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create output folder navigation option in python tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1198457#M58083</link>
      <description>&lt;P&gt;Thanks again. 'DEType' was exactly what I was looking for and worked perfectly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 12:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-output-folder-navigation-option-in-python/m-p/1198457#M58083</guid>
      <dc:creator>WadeWall</dc:creator>
      <dc:date>2022-08-02T12:40:23Z</dc:date>
    </item>
  </channel>
</rss>

