VC Pro 4.8.
I’ve had an odd problem crop up in the past randomly a few times, but now I’ve found a way to make it recur reliably.
It began with saving a VCMX component from an older VCMX layout (same VC version) using the modelling tab. This component was originally created as an imported Solidworks model.
The saved VC component was imported into my current VCMX layout, with no issues. However after saving the layout and closing VC, I found that when I re-opened that layout a day later, the component was no longer visible in the 3D model. It was still present in the Cell Graph, and was set to Visible. Toggling Visibility on and off had no effect. The component was still movable using the Interact or Move tools, but not selectable by clicking on it (or rather, the space it invisibly occupied) in the 3D model.
I attempted to delete the component from the Cell Graph, and VC threw a fatal exception.
In the interests of making progress, I shrugged and re-imported the component, which worked perfectly well… until I saved and closed. Re-opening the layout left me with two invisible components that cannot be deleted.
The delete-failure output:
Unhandled exception occurred:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at MS.Internal.Data.RBTree1.get_Item(Int32 index) at MS.Internal.Data.LiveShapingList.get_Item(Int32 index) at VisualComponents.UX.Shared.DataTreeBehavior.RemoveComponentNodes(Object treeView, IEnumerable1 nodes)
at VisualComponents.UX.Shared.TreeNode.OnRemoveButtonClick(MouseButtonEventArgs e)
at VisualComponents.UX.Shared.TreeNodeEx.<get_RemoveNodeCommand>b__316_0()
at VisualComponents.UX.Shared.TreeViewExCommandHandler.Execute(Object parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)