Hi,I have a GP tool that has an optional Featureset parameter (rest definition is included at the end) which I don't seem to be able to cope with in the silverlight API.Using Fiddler I can see that the rest submit page creates the parameter with an empty value. If I exclude this parameter before calling the tool I get an "Error submiting job" message.If in c# I do: FSet = new FeatureSet();
//nothing added to FSet.Features
Parameters.Add(new GPFeatureRecordSetLayer("BuildingPolygons_Input", FSet));
Then fiddler shows the parameter with the following value:{"features":[]}This causes the GP tool to return an "Unable to complete the operation" message.If I try FSet = null
Parameters.Add(new GPFeatureRecordSetLayer("BuildingPolygons_Input", FSet));
or Parameters.Add(new GPFeatureRecordSetLayer("BuildingPolygons_Input", ""));
The silverlight API throws the following exception before the call is made to the GP tool:"Object reference not set to an instance of an object."
at ESRI.ArcGIS.Client.Tasks.GPRecordSet.ToJson(Boolean normalizeCentralMeridian)
at ESRI.ArcGIS.Client.Tasks.Geoprocessor.GetParameters(List`1 parameters)
at ESRI.ArcGIS.Client.Tasks.Geoprocessor.SubmitJobAsync(List`1 parameters)
at AECOM.ESP.ViewModels.Surface.AnalysisDetailLOSViewModel.Run()
So how do I go about not providing the parameter or providing an empty parameter? Failing this can anything be done in the GP tool?Thanks in advance, Matt Parameter: BuildingPolygons_Input
Data Type: GPFeatureRecordSetLayer
Display Name: BuildingPolygons_Input
Direction: esriGPParameterDirectionInput
Default Value:
Geometry Type: esriGeometryPolygon
Spatial Reference: 2232
Fields:
FID (Type: esriFieldTypeOID, Alias: FID)
Shape (Type: esriFieldTypeGeometry, Alias: Shape)
BaseElev (Type: esriFieldTypeDouble, Alias: BaseElev)
Height (Type: esriFieldTypeDouble, Alias: Height)
TopMSL (Type: esriFieldTypeDouble, Alias: TopMSL)
Name (Type: esriFieldTypeString, Alias: Name)
Shape_Length (Type: esriFieldTypeDouble, Alias: Shape_Length)
Shape_Area (Type: esriFieldTypeDouble, Alias: Shape_Area)
Parameter Type: esriGPParameterTypeOptional
Category: