lrrr

Add-in extension - Spatial reference changed event

Discussion created by lrrr on Feb 26, 2013
Hi,

is there any way how to wire SpatialReferenceChanged event from my add-in extension class?

I tried to do something like:
protected override void OnStartup()
{
[INDENT]IActiveViewEvents_Event activeViewEvent = (IActiveViewEvents_Event)ArcMap.Document.ActiveView.FocusMap;[/INDENT]
[INDENT]activeViewEvent.SpatialReferenceChanged += new IActiveViewEvents_SpatialReferenceChangedEventHandler(OnSpatialReferenceChanged);[/INDENT]
}

void OnSpatialReferenceChanged()
{
[INDENT]System.Windows.Forms.MessageBox.Show("SpatialReferenceChanged");[/INDENT]
}

But it doesn't work.

Thank you.

Outcomes