VBA loading Function Key Set

I will attach what I have that dose not work. I have a too bar key for this, but it dose not work.

Path to file C:\ProgramData\Bentley\MicroStation V8i (SELECTseries)\WorkSpace\Interfaces\Fkeys\RJBP_2.MNU

Next I will attach the VBA file, then is fthere is one the handlers I will add this

Sub ChgFkeyFile()
' 12/13/10 - This is to change the F3 to View (Reset or ReDraw)
'05/11/11 - Changed Name From ChgFkey3 to ChangeFkey, added more Function Key changes..

    Dim startPoint As Point3d
    Dim point As Point3d, point2 As Point3d
    Dim lngTemp As Long

    Dim modalHandler As New Macro2ModalHandler4
    AddModalDialogEventsHandler modalHandler

'   The following statement opens modal dialog "Function Keys: ...\interfaces\fkeys\funckey.mnu"

'   Start a command
    CadInputQueue.SendCommand "DIALOG FUNCKEYS "

    RemoveModalDialogEventsHandler modalHandler
    CommandState.StartDefaultCommand

END SUB

Implements IModalDialogEvents
Private Sub IModalDialogEvents_OnDialogClosed(ByVal DialogBoxName As String, ByVal DialogResult As MsdDialogBoxResult)

End Sub

Private Sub IModalDialogEvents_OnDialogOpened(ByVal DialogBoxName As String, DialogResult As MsdDialogBoxResult)

    If DialogBoxName = "Function Keys: ...\interfaces\fkeys\funckey.mnu" Then

    '   The following statement opens modal dialog "Select Function Key Menu"

        CadInputQueue.SendCommand "ATTACH MENU C:\Program Files\Bentley\Workspace\interfaces\fkeys\FunckeyRJB.mnu,FK"

    '   Remove the following line to let the user close the dialog box.
        DialogResult = msdDialogBoxResultOK

    End If  ' Function Keys: ...\interfaces\fkeys\FunckeyRJB.mnu

    If DialogBoxName = "Select Function Key Menu" Then

        CadInputQueue.SendCommand "MDL COMMAND MGDSHOOK,fileList_setFilterCmd *.mnu"

        CadInputQueue.SendCommand "MDL COMMAND MGDSHOOK,fileList_setDirectoryCmd C:\Program Files\Bentley\Workspace\interfaces\fkeys\"

        CadInputQueue.SendCommand "MDL COMMAND MGDSHOOK,fileList_setFileNameCmd FunckeyRJB.mnu"

    '   Remove the following line to let the user close the dialog box.
        DialogResult = msdDialogBoxResultOK

    End If  ' Select Function Key Menu

End Sub

                                                       PS: Is there a way to find out if you have un-used  Macro#ModalHandler# ???

Above is teh failure, I  sued the recod macro to build it , but it hangs with the screen open . see bellow.

 

 

 

 

 

 

 

 

Parents Reply Children
No Data