1

Recently I asked a question in stack (How to search on values of a value list in python toolbox?). This question is about enable some default buttons in the tool. I wonder why the add, delete and order buttons not working for me. I want to order entries(rows) by order buttons but the order buttons only select records. Is that any config to enable these buttons? The full image of this tool can be found in the past question.

Tool Interface

asked Nov 13, 2016 at 17:49

2 Answers 2

1

I think the short answer is no, you cannot alter the properties of these buttons as they are not exposed. I have found no way to hook into the onclick event of these buttons. May be there is a way, sure would like to know!

This table view control is flaky as I know some of the ESRI geo-processing tools that expose this control don't even work so don't be surprised it's not working for you, you have not done anything wrong!

answered Nov 14, 2016 at 12:01
2
  • I might not be able to help with your question, but did you write a tool that uses these buttons? If you did, can we see how you set up your parameters? I'd like to test it on my machine. Commented Nov 14, 2016 at 15:29
  • No I did not write any code to use these buttons as there is nothing in the Help file about them or how to access\interact them. Commented Nov 14, 2016 at 15:32
0

In my previous question( How to search on values of a value list in python toolbox?) ] I used "if not parameters[3].altered:" to enable update the value in value table. When i used this code, value table buttons enabled automatically.

This is a part of my code :

 def updateParameters(self, parameters):
 if parameters[2].altered:
 if not parameters[3].altered:
 result = arcpy.GetCount_management(parameters[2].value)
 count = int(result.getOutput(0))
 with arcpy.da.SearchCursor(parameters[2].value,["Station","Line","Row"]) as cur:
 vtab = []
 for row in cur:
 vtab.append([row[0],row[1],row[2]])
 parameters[3].value = vtab
 parameters[3].filters[2].list = range(1,count+1)
 return
answered Nov 16, 2016 at 18:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.