Hello!
I´m getting .NET exception on Microstation V8I Selectseries 4 (08.11.09.867) [using bentley map 08.11.09.862] with strange behavior.
It happens when I try to drop my complex elements (features). Of course to accept the drop operation, a window is displayed:
Everything works fine if I click Yes(by that I mean complex elements are dropped without errors or crashes), but problem occurs if I decide to press No. After clicking this option, I receive unhandled .NET exception:
Somehow I managed to find a suitable workaround to fix that, as I read in this link, it might be caused by some docked windows. So I investigated more and found out that if I close the project explorer window(that is opened and docked by default when new UPF is created), the error is no longer present. It even does not matter if I open the project explorer window again, the problem is gone forever. (only weird thing is that even after clicking No, the message center says the element has been dropped, even though I pressed No - so it looks like it dropped it in some temporary state no matter what I choose).
However, I was wondering, if there is some explanation why is that happening or how to avoid this.
PS: I also tried .NET repair tool
Thanks in advance for answers.
Update1:
I found out that the .NET exception is being thrown after I undo the last action made (so basically drop of the element), as I react to changed state of the element. According to that, I´m changing also subject of this question from Microstation V8I .NET exception after closing a window to Microstation V8I .NET exception after undoing dropped element.
Workaround still works though. After I close the docked Project explorer window, the problem is no longer present.
Sorry for the delay in response to your issue. Is this "complex elements or feature" something that was produced in Bentley Map or is this unrelated? Did this error appear again after you followed the suggested workaround in the provided old discussion?
https://communities.bentley.com/products/microstation/f/z_-archived-microstation-v8i-forum/90632/element-information-use-causes-crash
Have you thought about upgrading to the latest version of Bentley Map | OpenCities Map?
https://www.bentley.com/en/desktop-applications
RegardsAndrew BellTechnical SupportBentley Systems
Hello! Thanks for your reaction.
The complex elements I talk about (composite of multiple elements) are being created using MDL API. All of the operations of them are working correctly (even the drop element tool used on them), so I don´t think they are the cause.
The dialog window I´ve attached is my calling too, but its ordinary Windows API MessageBox. After I click No option, I just undo last action (that is dropped element, as in my case I´m reacting to changed state of currently dropped element - thats new finding and I will update it in the question too). Thats when the exception occurs. However, I can´t really react to it as its coming from the .NET and is leading me into the MS code base.
Old thread I linked in the question helped me a little bit, as the workaround I mentioned is working correctly and this exception is no longer present, after I apply the mentioned steps.
Hi Lubo,
Lubo B said:I´m getting .NET exception on Microstation V8I Selectseries 4 (08.11.09.867) [using bentley map 08.11.09.862] with strange behavior.
Because you do not use MicroStation, but Bentley Map, I strongly recommend to move this discussion to OpenCities Map forum. The issue is likely specific for Bentley Map and not common to MicroStation.
To move existing post, use More > Move tool available under your original post.
Lubo B said:It happens when I try to drop my complex elements (features).
What tool do you use? Standard Drop element tool or something else (key-in, VBA macro...)?
Lubo B said:After clicking this option, I receive unhandled .NET exception:
Please, in future, copy complete text of Exception as text, put it to text file and attach it to the post. Screen capture is not easy to read and not complete exception text is available.
Lubo B said:I found out that the .NET exception is being thrown after I undo the last action made
So is it that you confirmed dialog "It is not possible to undo this operation" and when you use Undo, the exception is thrown?
Lubo B said:The complex elements I talk about (composite of multiple elements) are being created using MDL API
So the complex elements are not created by Bentley Map? Is it your code or is it 3rd party application?
Lubo B said:All of the operations of them are working correctly (even the drop element tool used on them), so I don´t think they are the cause.
It's hard to say, because Bentley Map is not MicroStation. Bentley Map applies a lot of constrains, disable or replace some standard MicroStation tools and also creates elements, that are locked when edited in MicroStation.
One more question: In what "project mode" do you use Bentley Map? mslink based database, "DGN only" XFM project, XFM project based on data in spatial database, no project (just graphical edit)...?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hello.
Jan Šlegr said:Because you do not use MicroStation, but Bentley Map, I strongly recommend to move this discussion to OpenCities Map forum. The issue is likely specific for Bentley Map and not common to MicroStation. To move existing post, use More > Move tool available under your original post.
You are right, thanks. Will move it to the Bentley Map section.
Jan Šlegr said:What tool do you use? Standard Drop element tool or something else (key-in, VBA macro...)?
Standard Drop element tool.
Jan Šlegr said:So is it that you confirmed dialog "It is not possible to undo this operation" and when you use Undo, the exception is thrown?
I try to undo the operation in code, by result of my own dialog (shown in the first picture). So when I click 'No', I call mdlUndo_undoActions(1). Then the exception is thrown.
Jan Šlegr said:One more question: In what "project mode" do you use Bentley Map? mslink based database, "DGN only" XFM project, XFM project based on data in spatial database, no project (just graphical edit)...?
DGN only.
Thanks for your reaction.
honestly, I am confused a bit and I still feel I do not understand the situation right.
What is your exact workflow?
More questions:
Regards,