Workflow error: The calling thread cannot access this object because a different thread owns it
Hello I have set up an workflow that call an geoproccessing tool and the tool return an GPFeatureRecordSetLayer.
I want to present this in the viewer an add the tool: "AddTemporaryMarkupGeometry" with the parameter: gpResult.FeatureSet.Features()
gpResult are a parameter and the return of the geoproccesing.
Get this error messages: The calling thread cannot access this object because a different thread owns it
Some tip?
Best regards
Jan-Henrik Nilsen
-
I experienced something alike.
Try creating a new variable and use the ASIGN activity to assign gpResult.FeatureSet.Features() to it.
Then use this new variable as input into the AddTemporaryMarkupGeometry activity instead of directly using gpResult.FeatureSet.Features()
0 -
Also be sure to pass the correct parameter type to the command. The AddTemporaryMarkupGeometry command takes a single Geometry object as its parameter. Where as gpResult.FeatureSet.Features() will give you an IEnumerable<Graphic>.
--Ryan
0 -
Hello thanks for tip Ryen and Sune
I tried the Command Name AddFeatureSetsToSelection, and then I got the result up in the table view. But I also want to present the same result in map. That command can I use then?
Best regards
Jan-Henrik Nilsen
0 -
I am having similar issues ("The calling thread cannot access this object because a different thread owns it.") when I simply try to NEW() a SimpleMarkerSymbol (or any symbol for that matter), from within a workflow.
[ Assign ]
myLineSymbol = new Esri.ArcGIS.Client.Symbols.LineSymbol() << crashes the Workflow.. and myLineSymbol is declared as an Esri.ArcGIS.Client.Symbols.LineSymbol , too.
0 -
Frederic,
I'm getting the same error when trying to set the renderer. Did you find a solution to this?
Thanks,
Stephanie0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare