1

I am trying to implement a Python Script tool where I need a table to input shapefiles and corresponding names for new created fields.

I found out that there is the Value Table provided by ArcGIS, but using the "Geostatistical Value Table" as data type in the properties of the script, it does not appear correctly in the user interface, see attachment where I just made a small test.

The tool is a python script tool (*.tbx) and the geostatistical analyst extension is enabled. My code so far includes only the Import Statements and Statements to read out the Parameter.

import arcpy
inputShp = arcpy.GetParameterAsText(0) 

Then I passed on the the script to a custom toolbox and added the Parameter where I chose Geostatistical Value Table as data type.

After finishing the wizard, I can open the tool, but as you can see from the figure, it seems that there is too few space below test to enter a shapefile.

It should look somehow like in this example, right: Creating a ValueTable with a column that has dependency

enter image description here

6
  • Would you be able to edit your question to make clear whether you are working with a Python Script tool (*.tbx) or a Python Toolbox tool (*.pyt), please? Either way, for help with ArcPy questions you should normally include a code snippet to illustrate what you have tried and where you are stuck. Are you using the GeoStatistical Analyst extension? If not, I suspect that you are using the wrong data type.
    – PolyGeo
    Commented Feb 15, 2016 at 8:49
  • edited my question, should be more understandable now.
    – the_chimp
    Commented Feb 15, 2016 at 12:06
  • I'm still unclear about why you are doing anything related to the GeoStatistical Analyst here. Is it just because you saw something related to Value Tables and that together or are you trying to write a tool related to GeoStatistical Analyst?
    – PolyGeo
    Commented Feb 15, 2016 at 12:33
  • I need an interface where I can input several shapefiles and give each shapefile a name which is then used as field name after some calculations. So I do not only want to input x shapefiles, but x shapefiles + a second column to input another string. When I created the Python Script I was looking in the data types for a suitable type and I found this Geostatistical Value Table. That's why I tried to use it.
    – the_chimp
    Commented Feb 15, 2016 at 12:51
  • 1
    Note that the example you are looking at (the one you gave a link to) doesn't have a successful answer. You should continue looking for better information. Check the ESRI help files on script parameters to start with. If you need your user to input shapefiles, then your input type is Shapefile. Selecting MultiValue=Yes in your parameter properties isn't the whole deal. You need to set up your value table. The value table has to do with how you are collecting parameters, not the data type. Sorry, I don't have time to look up the whole answer for you right now.
    – RHB
    Commented Feb 16, 2016 at 12:52

1 Answer 1

1

I think you may be hitting a limitation of Python Script Tools in standard toolboxes (*.tbx) in that they do not support Value Tables.

See Why learn/use Python Toolboxes over Python Script Tools?

If you need Value Tables then you will need to use a Python Toolbox (*.pyt).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.