Select to view content in your preferred language

GPKX: Having issues with multiple output parameters with different Geometry types

962
2
07-29-2022 08:42 AM
BjornKuiper
Emerging Contributor

Hi,

we discovered an issue where having multiple output parameters (2 in this case) with different geometry types (polygon and polyline) causes issues and mix up within the ArcGIS local server when trying to retrieve the results.

In our Python script:

arcpy.SetParameter(9, contour_polygons)
arcpy.SetParameter(10, contour_lines)

Where output parameter 9 contains a feature layer with polygons and output parameters 10 contains a feature layer with polylines.

We have it equally defined in our output parameters in our toolbox definition for the script.

But the Geoprocessing LocalServer somehow is switching the output features up. The order of output parameters / generated layers is AllContourLines (0) and allPolygons (1). (see screenshot: resultlayers.png)

while clicking on AllContourLines (0) will give you the output of the polygon results and the AllPolygons (1) will give you the polyline results. (see screenshot result_0, item1)

Which in itself would not be a problem, but when we are creating the FeatureTable from the FeatureLayer, and querying the FeatureTable using QueryFeaturesAsync(QueryParameters), it is actually retrieving the results of the other layer and will throw an exception:

"Geodatabase shape wrong type: Geometry's type does not match the type of the table."

I can send you the project to reproduce this error in a private message.

We are using: Runtime for .NET 100.14. We are converting our scripts from ArcGIS Runtime for WPF to .NET.

0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi Bjorn,

Great to see you back in the community.

Can you share a repro with me via mbranscomb@esri.com ?

 

Thanks 

BjornKuiper
Emerging Contributor

Thanks! i send you an e-mail.

0 Kudos