Using Geopak .878, in my cross section generation file, when I attempt to remove an attached reference that has my existing ground surface, I first get a warning that I might be disabling rules:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Bentley.MicroStation.Exceptions.InvalidArgumentException: NULL elemRef
at Bentley.Internal.MicroStation.Elements.Element.ElementFactory(IElementRef* , DgnModelRef* )
at Bentley.MicroStation.AddIn.ElementChangedEventArgs.get_NewElement()
at Bentley.DesignExplorer.ElementExplorer.DgnFileProvider.ElementChangeCallback(AddIn addIn, ElementChangedEventArgs eventArgsIn)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Bentley.Internal.MicroStation.EventHandlerSet.Fire(Object eventKey, Object sender, EventArgs e)
at Bentley.MicroStation.AddIn.raise_ElementChangedEvent(AddIn sender, ElementChangedEventArgs eventArgs)
at Bentley.MicroStation.AddIn.generateElementChangedEvent(msElementDescr* newDescr, msElementDescr* oldDescr, changeTrackInfo* info, Int32* cannotBeUndoneFlag)
at Bentley.Internal.MicroStation.CoreHook.DispatchNoHandler(UInt32* argStack, UInt32 mysp, IntPtr pFunc)
at Bentley.Internal.MicroStation.CoreHook.Dispatch(UInt32* argStack, UInt32 mysp, IntPtr pFunc)
I get this error also when I try to generate static cross sections in the same working file.
When I use a backup version of this working file, I do not get this error when I remove the same existing surface attachment.
Using civil display browser within the active file, I see no issues; everything is green.
If I detach other references, everything behaves perfectly well, even if I do get a warning that I might be disabling rules.