IViewUpdateEvents

I had developed a program using vba. It was executed successfully in Microstation V8. But in Microstation v8i[Select series 1] - version 08.11.07.171, the same program doesn't work and there is no compile error/runtime error also. How to fix this? Kindly clarify.

The coding snippet is given below for your reference.

clsTrackZoom

Option Explicit
Implements IViewUpdateEvents
Private Sub IViewUpdateEvents_AfterRedraw(TheViews() As View, TheModels() As ModelReference, ByVal DrawMode As MsdDrawingMode)
   updateZoom
End Sub
Private Sub IViewUpdateEvents_BeforeRedraw(TheViews() As View, TheModels() As ModelReference, ByVal DrawMode As MsdDrawingMode)

End Sub

''------------------------------------------------------------------------------------------------------------

modMain

Public Sub RescaleAnnotation()
   Dim objc As clsTrackZoom
   Set objc = New clsTrackZoom 
   AddViewUpdateEventsHandler objc
End Sub

Public Function updateZoom()
   MsgBox "view updated"
End Function

Parents
  • Hi Dharma,

    it works on my computer with V8i (SELECTseries 2) and V8i (SELECTseries 3) Update 2 on Windows 8.1. Have no chance to test it with V8i (SELECTseries 1), it's too old so not installed.

    I have several notes / requests:

    • If you post any code, please always use Syntax Highlighter tool (pencil icon in Advanced Editor toolbar) and choose a proper language syntax.
    • Your aim should be to make answers as easy as possible, which in this case mean to don't provide the code only (which require to create mvba, create class module and to put all required code into it), but rather to prepare mvba file and attach it to your post, which will highly increase a chance people will test it and provide their answers.
    • Don't expect a dependency exists, but what Windows and graphics card do you use? Also are there any other applications installed and active in your MicroStation environment?

    Here is mvba I created and used for the testing:

    view-update.mvba

    With regards,

     Jan

Reply
  • Hi Dharma,

    it works on my computer with V8i (SELECTseries 2) and V8i (SELECTseries 3) Update 2 on Windows 8.1. Have no chance to test it with V8i (SELECTseries 1), it's too old so not installed.

    I have several notes / requests:

    • If you post any code, please always use Syntax Highlighter tool (pencil icon in Advanced Editor toolbar) and choose a proper language syntax.
    • Your aim should be to make answers as easy as possible, which in this case mean to don't provide the code only (which require to create mvba, create class module and to put all required code into it), but rather to prepare mvba file and attach it to your post, which will highly increase a chance people will test it and provide their answers.
    • Don't expect a dependency exists, but what Windows and graphics card do you use? Also are there any other applications installed and active in your MicroStation environment?

    Here is mvba I created and used for the testing:

    view-update.mvba

    With regards,

     Jan

Children