I've noticed that that ArcGis Commands are activated asynchronously.

So I supposed that there is a chance to corrupt memory without using thread locks when overriding Enabled void of custom ArcGIS command.

Am I right?

1 Answer 1


ArcGIS is just a big single threaded application, all the enabled logic in the core commands and tools runs sequentially every 300ms. Since ArcObjects is blazingly fast it just gives the appearance that it happens all at once because these objects really aren't doing much. If you put complex IO in the enabled logic, you'll start getting wait cursors and sluggish performance which is why Esri recommends against it.

  • Actually at ArcGIS 10, ArcMap is a multi-threaded application, with separate threads for certain things such as basemap layers. Additionally background geoprocessing runs on a separate process entirely. Source: support.esri.com/en/knowledgebase/techarticles/detail/31903
    – blah238
    Commented Dec 6, 2012 at 3:54
  • Additionally some UI elements such as add-in comboboxes seem to run on their own thread resulting in quirks as described in ArcGIS 10 add-in: ComboBox add-in component focus issue
    – blah238
    Commented Dec 6, 2012 at 3:56
  • Your combobox problem is more about the text control within it not giving up focus easily. Starting a new thread will kick it out as would have SendKeys.SendWait("{ESC}") before showing your messagebox.
    – SeaJunk
    Commented Dec 6, 2012 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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