private bool CheckGraphicExistance(IElement elem, IAGAnimationContainer animContainer)
{
IActiveView view = animContainer.CurrentView as IActiveView;
IGraphicsContainer graphicsContainer = view as IGraphicsContainer;
graphicsContainer.Reset();
bool exists = false;
IElement temp = graphicsContainer.Next();
while (temp != null)
{
if (temp == elem)
{
exists = true;
break;
}
temp = graphicsContainer.Next();
}
return exists;
}