Menus & Pull-downs

Discussion in 'AutoCAD' started by Matt W, Oct 13, 2004.

  1. Matt W

    Matt W Guest

    Is it possible to determine what pull-down belongs to what menu??
    Let's say the File pull-down is in the ACAD menu and MyStuff is in a CUSTOM
    menu.
    How can I programmatically get that info?

    I hope my short explaination was clear enough.

    Here's my code so far:

    Code:
    Sub ListMenus()
    Dim oMenu As AcadMenuGroup
    Dim oPopMenu As AcadPopupMenu
    Dim oMenuGroup As AcadMenuGroup
    Dim i As Integer
    
    For Each oMenu In Application.MenuGroups
    Debug.Print oMenu.MenuFileName
    Debug.Print oMenu.Name
    Next oMenu
    
    Dim objPopupMenu As AcadPopupMenu
    
    For Each oPopMenu In Application.MenuBar
    Debug.Print oPopMenu.NameNoMnemonic
    Next
    End Sub
    
     
    Matt W, Oct 13, 2004
    #1
  2. For Each oPopMenu In Application.MenuBar
    Debug.Print oPopMenu.NameNoMnemonic
    Debug.Print oPopMenu.Parent.Parent.Name '<- added
    Next


    --
    R. Robert Bell


    Is it possible to determine what pull-down belongs to what menu??
    Let's say the File pull-down is in the ACAD menu and MyStuff is in a CUSTOM
    menu.
    How can I programmatically get that info?

    I hope my short explaination was clear enough.

    Here's my code so far:

    Code:
    Sub ListMenus()
    Dim oMenu As AcadMenuGroup
    Dim oPopMenu As AcadPopupMenu
    Dim oMenuGroup As AcadMenuGroup
    Dim i As Integer
    
    For Each oMenu In Application.MenuGroups
    Debug.Print oMenu.MenuFileName
    Debug.Print oMenu.Name
    Next oMenu
    
    Dim objPopupMenu As AcadPopupMenu
    
    For Each oPopMenu In Application.MenuBar
    Debug.Print oPopMenu.NameNoMnemonic
    Next
    End Sub
    
     
    R. Robert Bell, Oct 13, 2004
    #2
  3. Matt W

    Matt W Guest

    I was close.
    Thanks again for your help.

    --
    I support two teams: the Red Sox and whoever beats the Yankees.


    | For Each oPopMenu In Application.MenuBar
    | Debug.Print oPopMenu.NameNoMnemonic
    | Debug.Print oPopMenu.Parent.Parent.Name '<- added
    | Next
    |
    |
    | --
    | R. Robert Bell
    |
    |
    | | Is it possible to determine what pull-down belongs to what menu??
    | Let's say the File pull-down is in the ACAD menu and MyStuff is in a
    CUSTOM
    | menu.
    | How can I programmatically get that info?
    |
    | I hope my short explaination was clear enough.
    |
    | Here's my code so far:
    |
    |
    Code:
    | Sub ListMenus()
    |    Dim oMenu As AcadMenuGroup
    |    Dim oPopMenu As AcadPopupMenu
    |    Dim oMenuGroup As AcadMenuGroup
    |    Dim i As Integer
    |
    |    For Each oMenu In Application.MenuGroups
    |        Debug.Print oMenu.MenuFileName
    |        Debug.Print oMenu.Name
    |    Next oMenu
    |
    |    Dim objPopupMenu As AcadPopupMenu
    |
    |    For Each oPopMenu In Application.MenuBar
    |        Debug.Print oPopMenu.NameNoMnemonic
    |    Next
    | End Sub
    | 
    |
    | --
    | I support two teams: the Red Sox and whoever beats the Yankees.
    |
    |
    |
     
    Matt W, Oct 14, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.