Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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