0

I have using IViewUpdateEvents events in MicroStation CONNECT Edition. It's rapidly called again and again.After some time MicroStation CONNECT shows stopped working.I am using same code in microstation,it's working fine.I am using following code in my mvba file class.Thank u

 Option Explicit


Private WithEvents m_OpenCloseHooks As MicroStationDGN.Application
'Private oEventHandlers As clsEventHandlers

'Implements IViewUpdateEvents
Private Sub Class_Initialize()
    Set m_OpenCloseHooks = MicroStationDGN.Application
End Sub
'------------------------------------------------------------
'Private Sub Class_Terminate()
' This is executed when an instance of this class is destroyed
Private Sub Class_Terminate()
  'Remove the existing reference, if any, to the current MicroStation session
  Set m_OpenCloseHooks = Nothing
End Sub
Private Sub m_OpenCloseHooks_OnDesignFileOpened(ByVal DesignFileName As String)
   MsgBox "Dgn File is open"
End Sub
Private Sub m_OpenCloseHooks_OnDesignFileClosed(ByVal DesignFileName As String)
  MsgBox "Dgn File is close"
End Sub
Private Sub IViewUpdateEvents_AfterRedraw(TheViews() As View, TheModels() As ModelReference, ByVal DrawMode As MsdDrawingMode)
   MsgBox "After view updation"
End Sub
Private Sub IViewUpdateEvents_BeforeRedraw(TheViews() As View, TheModels() As ModelReference, ByVal DrawMode As MsdDrawingMode)
  MsgBox "Before View updation"
End Sub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.