<?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: Setting Parameter Data Type/Properties in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488366#M38143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a script which I've added to a toolbox in ArcGIS 10.0.&amp;nbsp; The script asks the user for a geodatabase (I'm creating and storing rasters from a NetCDF file) and either uses an existing geodatabase or creates a new one if it doesn't exist.&amp;nbsp; In adding the script to a toolbox the problem I'm having is what parameter data type to select and/or what parameter properties need to be set to allow me to put in a geodatabase that doesn't exist.&lt;BR /&gt;&lt;BR /&gt;The script runs if an existing geodatabase is selected but not if a new one is selected.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only way you can do this and have the validation not delete the output geodatbase before the script begins is to provide two parameters: 1) an existing folder (Input,Folder,Required) where the geodatabase exists and 2) a geodatabase name (Input,Folder,String) (to which you can add a ".gdb" to within your script [or validation code] if it isn't provided).&amp;nbsp; If the geodatabase does not exist, your script must create it using the CreateFileGDB tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want your script to return the gdb as an output (say, for modelbuilder to chain into the next tool) you put it last as a parameter of type (Derived,Workspace) and return the path in your script using arcpy.SetParameterAsText() in your script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2013 16:06:39 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2013-01-09T16:06:39Z</dc:date>
    <item>
      <title>Setting Parameter Data Type/Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488364#M38141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a script which I've added to a toolbox in ArcGIS 10.0.&amp;nbsp; The script asks the user for a geodatabase (I'm creating and storing rasters from a NetCDF file) and either uses an existing geodatabase or creates a new one if it doesn't exist.&amp;nbsp; In adding the script to a toolbox the problem I'm having is what parameter data type to select and/or what parameter properties need to be set to allow me to put in a geodatabase that doesn't exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script runs if an existing geodatabase is selected but not if a new one is selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 14:34:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488364#M38141</guid>
      <dc:creator>MikeKnowles</dc:creator>
      <dc:date>2013-01-09T14:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Parameter Data Type/Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488365#M38142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Probably 'workspace' type... don't know what is in your script, can you post it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you already entered the lines in your script to fetch the needed parameters, GetParameterAsText, I am assuming?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 15:11:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488365#M38142</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-09T15:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Parameter Data Type/Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488366#M38143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a script which I've added to a toolbox in ArcGIS 10.0.&amp;nbsp; The script asks the user for a geodatabase (I'm creating and storing rasters from a NetCDF file) and either uses an existing geodatabase or creates a new one if it doesn't exist.&amp;nbsp; In adding the script to a toolbox the problem I'm having is what parameter data type to select and/or what parameter properties need to be set to allow me to put in a geodatabase that doesn't exist.&lt;BR /&gt;&lt;BR /&gt;The script runs if an existing geodatabase is selected but not if a new one is selected.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only way you can do this and have the validation not delete the output geodatbase before the script begins is to provide two parameters: 1) an existing folder (Input,Folder,Required) where the geodatabase exists and 2) a geodatabase name (Input,Folder,String) (to which you can add a ".gdb" to within your script [or validation code] if it isn't provided).&amp;nbsp; If the geodatabase does not exist, your script must create it using the CreateFileGDB tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want your script to return the gdb as an output (say, for modelbuilder to chain into the next tool) you put it last as a parameter of type (Derived,Workspace) and return the path in your script using arcpy.SetParameterAsText() in your script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 16:06:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-parameter-data-type-properties/m-p/488366#M38143</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-01-09T16:06:39Z</dc:date>
    </item>
  </channel>
</rss>

