Connecting events between ILayer and IScene

422
1
09-17-2013 05:01 AM
rasmusbording
New Contributor
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 asses to IScene from my ILayer?

Thanks!
0 Kudos
1 Reply
rasmusbording
New Contributor
I found a workaround.

The IDisplay argument to ILayer::draw is a ISceneGraph in ArcScene
so I can use this.
0 Kudos