matoretta

how to set a list of values to geoprocessing service parameter??

Discussion created by matoretta on Sep 19, 2011
hi i use code like this ( below )to use geoprocessing service whit few model parameters, but how to do it if i have list of values as my input and output parameters...(see attachment...f.e. clip) if my inputs and outputs are strings... is it possible use like this:
GPString gpstr = new GPString();
gpstr.setValue("states;rivers;lakes");   ????


THIS IS CODE FOR JUST ONE VALUE.
//Create a linear unit to define the buffer distance
GPLinearUnit gpLU = new GPLinearUnit();

gpLU.setUnits(EsriUnits.esriMeters);

gpLU.setValue(50000.0);

//Define a layer name select features using the buffer
GPString gpstr = new GPString();
gpstr.setValue("states");

//Set input values in the same order listed by the GP service
GPValue[] gpvalues = new GPValue[3];
gpvalues[0] = gpfrs;
gpvalues[1] = gpLU;
gpvalues[2] = gpstr;

//Submit job
String JobID = gpserver.submitJob(gpti.getName(), gpvalues);

Attachments

Outcomes