Python toolbox gpCalculatorExpression example

1814
1
10-30-2013 12:17 AM
antoniogomez
New Contributor
Hello Forum

I'm new at python toolboxes and I`m trying to create a toolbox that shows a typical Calculator Field Parameter but I cant find any code example of how to manage it.

Assuming two parameters in my python toolbox ( param0 a dbase input and param1 a Calculator Expression), how could I feed the GPCalculatroExpression with the fields passed as a dbase table parameter?

Thank you in advance

Toni
Reply
0 Kudos
1 Reply
KeaganAllan
New Contributor III
Hi,

I do not know much about Python, however I do find it useful to set the process you want to do in the Model Builder and then export the model to Python Script.

File - Export Model - To Python Script

Opening that file in Notepad or similar text editor allows you to look into how a process / geoprocessor uses syntax to reference the various inputs and parameters you want to use.

I know its not much, but hopefully it will get you on track.

Good luck,

K
Reply
0 Kudos