GPRecordSet gpRecordSet = new GPRecordSet("RecordSetData");
foreach (Graphic graphic in myGraphicsLayer)
{
gpRecordSet.FeatureSet.Features.Add(graphic);
}
Geoprocessor geoprocessorTask = new Geoprocessor(myServiceURL);
geoprocessorTask.UpdateDelay = 5000;
geoprocessorTask.Failed += geoprocessorTask_Failed;
geoprocessorTask.JobCompleted += geoprocessorTask_JobCompleted;
List<GPParameter> gpParameters = new List<GPParameter>();
gpParameters.Add(new GPString("XField", "LON"));
gpParameters.Add(new GPString("YField", "LAT"));
gpParameters.Add(gpRecordSet);
geoprocessorTask.SubmitJobAsync(gpParameters);
{ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
[ESRI.ArcGIS.Client.Tasks.ServiceException]: {ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
Data: {System.Collections.ListDictionaryInternal}
InnerException: null
Message: "Unable to complete operation."
StackTrace: null
arcpy.AddMessage("Script version 1")
XField = arcpy.GetParameterAsText(0)
YField = arcpy.GetParameterAsText(1)
RecordSetData = arcpy.GetParameterAsText(2)
arcpy.AddMessage("Finished")
Solved! Go to Solution.
{ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
[ESRI.ArcGIS.Client.Tasks.ServiceException]: {ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
Data: {System.Collections.ListDictionaryInternal}
InnerException: null
Message: "Unable to complete operation."
StackTrace: null
{ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
[ESRI.ArcGIS.Client.Tasks.ServiceException]: {ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
Data: {System.Collections.ListDictionaryInternal}
InnerException: null
Message: "Unable to complete operation."
StackTrace: null
No luck :confused:
Was anyone successful in creating a GPRecordSet in the silverlight app ( the recordset should contain multiple records with X and Y fields) and send it to GP task to create a XYEvent layer
Thanks