Select to view content in your preferred language

How do I  refresh a GroupLayer in ArcScene?

2059
0
03-13-2014 12:34 AM
Andreas_W_Paulsen
Occasional Contributor
I have working code that creates a new grouplayer and add some custom layers to it.
However when I later create a new custom layer and add it to an existing grouplayer; it is not drawn and I have to right-click on the group layer and press refresh.

I have code that I use to refresh the drawing which works for non group layers:
void Util::refresh(IScenePtr scene, ILayerPtr layer) 
{
 ISceneGraphPtr sgraph;
 scene->get_SceneGraph(&sgraph);
 sgraph->Invalidate(layer, VARIANT_TRUE, VARIANT_TRUE);
 ISceneViewerPtr viewer;
 sgraph->get_ActiveViewer(&viewer);
 sgraph->Invalidate(viewer, VARIANT_TRUE, VARIANT_TRUE);
 sgraph->RefreshViewers();
}


I have tried to call this with both the group layer and the new custom layer without any success.
0 Kudos
0 Replies