We use a reference robotic cell from which we delete certain elements to generate various cell configurations. However, after generating the cell the 3D viewport becomes unuseable with the following call stack:
Unhandled exception occurred:VisualComponents.Create3D.InvalidWrapperException: Wrapper being used has been invalidated.
at VisualComponents.Revolution.TextFeatureWrapper.get_IsFloating()
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at VisualComponents.UX.Shared.FloatingPositionHelper.UpdatePositionsAll()
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at VisualComponents.Revolution.CameraWrapper.raise_PropertyChanged(Object value0, PropertyChangedEventArgs value1)
at VisualComponents.Revolution.CameraWrapper.Rotate(Point lastPoint, Point currentPoint)
at VisualComponents.UX.Input.RotateHandler.Delta(ManipulationEventArgs e)
at VisualComponents.UX.Input.MouseGestureHandler.OnMouseMove(Object sender, MouseEventArgs e)
at VisualComponents.UX.Input.HelperViewport.OnMouseMove(Object sender, MouseEventArgs e)
// shortened call stack
The code that deletes the nodes looks like this:
if (Component.FindNode(nodeName) is ISimNode nodeToDelete)
{
nodeToDelete.Delete();
}
Are there some extra steps that are missing to ensure the nodes are safely deleted?