rasmusbording

Connecting events between ILayer and IScene

Discussion created by rasmusbording on Sep 17, 2013
Latest reply on Sep 18, 2013 by rasmusbording
I have a custom layer for ArcScene in C++.

When I create the layer from a command I use:
ICommand::OnCreate(hook) and ISceneHookHelperPtr to get an IScenePtr.
Then I connect the scene and the layer with:
AtlAdvise(scene, IUnknownPtr(layer), __uuidof(IActiveViewEvents), &id);

However, when my layer is restored from disk after I have saved it in an .sxd
the layer is created in another place and the atl connection is not restored.

How can I get ***** to IScene from my ILayer?

Thanks!

Outcomes