ArcPy Custom Tools - Accessible by the JAVA ADK Add Ins?

481
0
02-04-2011 03:33 PM
AngelaHansen
New Contributor
Hi, I am quite new to this.

I am trying to use Java ArcGIS Add-Ins through eclipse. I have created a combobox that consists of a drop down with the 3 options that are possible for the one single parameter of a python tool I customized with arcpy.

Is there any way to execute this tool within the combo box, or do I have to recreate the tool in Java?

I tried adding the toolbox to my eclipse project, and upon selection change, I used the selection to populate the parameter array (which, in this case, is just one string), and then tried to execute the tool. No luck. Any pointers in the right direction would be much appreciated!

(this is just the code from the onSelChange)

public void onSelChange(int cookie) throws IOException, AutomationException {
 
  GeoProcessor geoProcessor = new GeoProcessor();
  geoProcessor.addToolbox("*******catalogPath********/xy.tbx");
  VarArray parameters = new VarArray();
  if (cookie == gisOption)
  {
   String gis = "gis";
   parameters.add(gis);
  }
  geoProcessor.execute("updateDate",parameters,null);
0 Kudos
0 Replies