Topic
  • 3 replies
  • Latest Post - ‏2013-11-14T20:52:33Z by jvogel-11
jvogel-11
jvogel-11
51 Posts

Pinned topic Macro Code for Synchronize Mirror Properties / Dictionary Update

‏2013-09-26T20:33:11Z |

I'd like to have my VBA macro evoke the Synchronize Mirror Properties function as well as the Dictionary Update function.  What method would I go about to doing this?

  • Larry Flores
    Larry Flores
    3 Posts
    ACCEPTED ANSWER

    Re: Macro Code for Synchronize Mirror Properties / Dictionary Update

    ‏2013-09-27T18:39:33Z  

    Hi,

    There is an ISAImf call that you can use to execute menu commands from your macro.  The function is called "SAExecuteMenuCommand" and it uses the menu number to execute the menu.  For example, to run Dictionary Update, you can do the following:

    ==============================================================

    Sub ExecuteMenuDictionaryUpdate()

    Dim sa As Object
    Dim SAImf As Object
    Dim RetVal

        Set sa = CreateObject("SA2001.Application")
        Set SAImf = sa.Interface("ISAImf")
            
            RetVal = SAImf.SAExecuteMenuCommand(133) '133 Dictionary Update
            
    'Clear Memory
    Set SAImf = Nothing
    Set sa = Nothing

    End Sub
    =======================================

    The menu number for Dictionary Update is 133.  The menu number for Synchronize Mirror Properties is 816.  If you would like to find the menu number for a different menu, then you should hover the mouse over the desired menu and then select CTRL+SHIFT+F1.  This will give you a dialog box with an SAIDM_XXX (XXX = menu number).

     

    Hope this helps.

    Thanks

    Larry Flores

  • Larry Flores
    Larry Flores
    3 Posts

    Re: Macro Code for Synchronize Mirror Properties / Dictionary Update

    ‏2013-09-27T18:39:33Z  

    Hi,

    There is an ISAImf call that you can use to execute menu commands from your macro.  The function is called "SAExecuteMenuCommand" and it uses the menu number to execute the menu.  For example, to run Dictionary Update, you can do the following:

    ==============================================================

    Sub ExecuteMenuDictionaryUpdate()

    Dim sa As Object
    Dim SAImf As Object
    Dim RetVal

        Set sa = CreateObject("SA2001.Application")
        Set SAImf = sa.Interface("ISAImf")
            
            RetVal = SAImf.SAExecuteMenuCommand(133) '133 Dictionary Update
            
    'Clear Memory
    Set SAImf = Nothing
    Set sa = Nothing

    End Sub
    =======================================

    The menu number for Dictionary Update is 133.  The menu number for Synchronize Mirror Properties is 816.  If you would like to find the menu number for a different menu, then you should hover the mouse over the desired menu and then select CTRL+SHIFT+F1.  This will give you a dialog box with an SAIDM_XXX (XXX = menu number).

     

    Hope this helps.

    Thanks

    Larry Flores

  • jvogel-11
    jvogel-11
    51 Posts

    Re: Macro Code for Synchronize Mirror Properties / Dictionary Update

    ‏2013-09-30T14:19:48Z  

    Hi,

    There is an ISAImf call that you can use to execute menu commands from your macro.  The function is called "SAExecuteMenuCommand" and it uses the menu number to execute the menu.  For example, to run Dictionary Update, you can do the following:

    ==============================================================

    Sub ExecuteMenuDictionaryUpdate()

    Dim sa As Object
    Dim SAImf As Object
    Dim RetVal

        Set sa = CreateObject("SA2001.Application")
        Set SAImf = sa.Interface("ISAImf")
            
            RetVal = SAImf.SAExecuteMenuCommand(133) '133 Dictionary Update
            
    'Clear Memory
    Set SAImf = Nothing
    Set sa = Nothing

    End Sub
    =======================================

    The menu number for Dictionary Update is 133.  The menu number for Synchronize Mirror Properties is 816.  If you would like to find the menu number for a different menu, then you should hover the mouse over the desired menu and then select CTRL+SHIFT+F1.  This will give you a dialog box with an SAIDM_XXX (XXX = menu number).

     

    Hope this helps.

    Thanks

    Larry Flores

    Thank you - I think this will work and will be a great help. Thanks Larry!

  • jvogel-11
    jvogel-11
    51 Posts

    Re: Macro Code for Synchronize Mirror Properties / Dictionary Update

    ‏2013-11-14T20:52:33Z  

    Hi,

    There is an ISAImf call that you can use to execute menu commands from your macro.  The function is called "SAExecuteMenuCommand" and it uses the menu number to execute the menu.  For example, to run Dictionary Update, you can do the following:

    ==============================================================

    Sub ExecuteMenuDictionaryUpdate()

    Dim sa As Object
    Dim SAImf As Object
    Dim RetVal

        Set sa = CreateObject("SA2001.Application")
        Set SAImf = sa.Interface("ISAImf")
            
            RetVal = SAImf.SAExecuteMenuCommand(133) '133 Dictionary Update
            
    'Clear Memory
    Set SAImf = Nothing
    Set sa = Nothing

    End Sub
    =======================================

    The menu number for Dictionary Update is 133.  The menu number for Synchronize Mirror Properties is 816.  If you would like to find the menu number for a different menu, then you should hover the mouse over the desired menu and then select CTRL+SHIFT+F1.  This will give you a dialog box with an SAIDM_XXX (XXX = menu number).

     

    Hope this helps.

    Thanks

    Larry Flores

    Larry - I am currently using 11.4.2.5 and CTRL+SHIFT+1 doesnt seem to be working.  Is there another way to get these numbers?