Add-in OnLoad fails to execute when opening MXD from command line

2966
11
02-02-2014 03:16 PM
jgers
by
New Contributor
OnLoad is supposed to be called when opening a document with a persisted stream. But, when I try loading the MXD from the command line  (ie. arcmap.exe somemapdoc.mxd), OnLoad never executes in my Add-in.  Is there a work around for this issue?
0 Kudos
11 Replies
jgers
by
New Contributor
I forgot to mention that this also occurs through shell execute.  ie. double click the mxd to launch ArcMap.
0 Kudos
DaveFullerton
Occasional Contributor III

I had problems with OnLoad not executing when double clicking the mxd.  Then I went to the config file and set the autoLoad attribute to true on the Extension element (default is false).  I also found this was the case in ESRI's sample solution, but it is not mentioned anywhere when you view the sample code in the browser.  There are a couple of bugs in the sample code as well (null references - really?). 

0 Kudos