I am upgrading a program from V8i to CONNECT Update 15. The V8i code had an instance of the Application class declared as follows:
Private WithEvents msApp As Bentley.Interop.MicroStationDGN.Application = Nothing
And thencode to handle the OnDesignFileOpened event:
Public Sub DesignFileOpened(ByVal Filename As String) Handles msApp.OnDesignFileOpened
This works in v8i. In CONNECT I get the following error:
Error BC30590 Event 'OnDesignFileOpened' cannot be found.
Can someone tell me how to upgrade this or what I am doing wrong?
please be aware this is general Developers and Programming forum. Because your question is about MicroStation, I recommend to move it to MicroStation Programming forum.
To move existing discussion to another forum, use More > Move tool, available under your original post. Please do not duplicate the post!
WarrenC said:The V8i code had an instance of the Application class
Can you share more information about your application?
There is no information about context shared, so we can guess only it is external process application, accessing MicroStation using Interop assembly. Because of weird language used, I guess it is VB.NET?
WarrenC said:as follows
Please, use Insert > Insert code tool every time, when you want to share a code snippet!
To read code, formatted as plain text, is confusing.
WarrenC said:Can someone tell me how to upgrade this or what I am doing wrong?
The events exist (at least what I see in the assembly itself).
I do not know VB.NET well, but is your application set to be 64bit, using the right Framework version, and referencing the right Interop?
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thanks for the reply. My application is set to 64 bit, using .Net framework 4.6.2 and is referencing the U15 interop.
Thanks for the help.