4

I'm currently using ArcGlobe to create a Polygon on a globe. Using examples I've found through arcgis.com I can now allow the user to click on the globe and create a polygon on the map. This works as intended and the visualization on the map is seen.

However, I'm now trying to do this in a new thread so I can create a polygon overlay and attempt to return a list of Coordinates from a single point of entry (Since there doesn't seem to be a TrackPolygon function like there is in ArcMap). When putting this code into it's own thread, the event handlers on the globe still work; however the GlobeGraphicsLayer.AddElement is no longer displaying this data on the globe.

Any ideas/suggestions?

7

ArcObjects are single threaded components and they should communicate between each other only if they are in the same thread. If you want to update ArcObjects from a background worker thread, you need to pass objects as simple types, which in case of complex objects involves serialization.

Th Writing multithreaded ArcObjects document covers these issues and solutions for them in a great detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.