Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In developing with ArcMap, is there any way to register a service that can be used during the life-cycle of a document- for example to do something like:



then later-


So kind of using the Service Locator pattern or similar.

share|improve this question
Just as @blah238 mentioned- found this source that clarifies where/how to coordinate different components. – leon Nov 28 '12 at 14:00
up vote 2 down vote accepted

Typically in AO you would use an extension to manage state and listen for the OpenDocument, CloseDocument, etc. events. See the Extension to listen to document open and save events sample for example.

If you need to persist data in the map document itself, see the How to persist data in a document sample.

share|improve this answer
Thanks. I created an Extension and publicly declared and initialized objects that tools and menus share as static members. Now I have 'global' access as long as the Extension is loaded. – leon Nov 27 '12 at 13:23

Your Answer


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.