Hi,all
I created a geoprocessing package (.gpkx) in ArcGIS Pro(3.02) involving a custom geoprocessing model that includes the Interpolate Shape (3D Analyst) geoprocessing tool, which output a poyline 3D feature with z-value, i executed the geoprocessing package with ArcGIS Runtime Local Server(200.1) using ArcGIS Maps SDK for .Net(200.2) , i got the poyline feature from the output, but the polyline feature is not has a z-value, and the z-values of the points("_Result") on the poyline are all 0.Can someone help me? thanks,
The relevant code is as follows:
private async void GpJobOnJobChanged(object o, JobStatus e)
{
// Show message if job failed
if (_gpJob.Status == JobStatus.Failed)
{
MessageBox.Show("Not found reason!", "Job Failed");
return;
}
// Return if not succeeded
if (_gpJob.Status != JobStatus.Succeeded) { return; }
try
{
// Get the results from the outputs.
GeoprocessingResult result = await _gpJob.GetResultAsync();
var value = result.Outputs.Values.LastOrDefault() as GeoprocessingFeatures;
IFeatureSet? gpOutputFeatures = null;
if (value.CanGetOutputFeatures)
gpOutputFeatures = await value.GetOutputFeaturesAsync();
else
gpOutputFeatures = value.Features ;
List<MapPoint> mapPoints = new List<MapPoint>();
foreach (var feature in gpOutputFeatures)
{
if (feature.Geometry is Esri.ArcGISRuntime.Geometry.Polyline polyline)
{
foreach (var part in polyline.Parts)
{
mapPoints.AddRange(part.Points);
}
}
}
_Result = mapPoints;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error");
}
finally
{
// Remove the event handlers.
_gpJob.ProgressChanged -= GpJob_ProgressChanged;
_gpJob.StatusChanged -= GpJobOnJobChanged;
}
}