Access persisted extension data in an mxd without using the application

Idea created by kirkktx on May 12, 2013
    • pareshp
    • kirkktx
    It is common practice for custom arcmap extensions to persist information in the mxd via IPersistVariant.

    While IMapDocument provides a way to open up an mxd and retrieve maps and layers, it does not provide a way to access persisted extension data.  I think this could be done by adding an interface to the MapDocument class that has interfaces to:
    •           enumerate extensions in the document
    •           load an extension, hydrating it with the persisted data
    •           save/update a hydrated extension to the mxd
    •           remove a persisted extension from the mxd

    I would like to load and save data to an mxd for a particular extension using only an ArcEngine license.

    This would make it easier to migrate ArcMap extensions to ArcGIS server SOE's.  When an mxd is published as a mapservice, the mxd is embedded within the service definition, and can be opened by an SOE using MapDocument, found relative to IMapServerInit.Filepath. The SOE could then use the same data used by the Arcmap extension.