Placing a custom menu under the File Menu and on specific position

Hello,

Is it possible to placing a custom menu after specific submenu from the File menu, after the Save submenu for example .

enhanceMainMenu.png

The script bellow insert my custom menu at the bottom of the File menu:

def enhanceMainMenu():
    mainMenu = c4d.gui.GetMenuResource("M_EDITOR")

    menu = c4d.BaseContainer()
    menu.InsData(c4d.MENURESOURCE_SUBTITLE, "Custom Menu")
    menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(ID_MENU_1))
    menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(ID_MENU_2))
    #menu.InsData(0, '') # Append separator
    menu.InsData(c4d.MENURESOURCE_COMMAND, "PLUGIN_CMD_{}".format(ID_MENU_3))

    filemenue = mainMenu.GetData(1)
    filemenue.InsData(c4d.MENURESOURCE_SUBMENU, menu)

    mainMenu.SetData(1, filemenue)

def PluginMessage(id, data):
    if id == c4d.C4DPL_BUILDMENU:
        enhanceMainMenu()

Thanks.

Hi @mfersaoui unfortunately, this is not as easy as it sounds in Python.
Find in How to use InsDataAfter in menu a user who wants to add its own item after the "Scroll to first active object" within the Object Manager menu and in the last answers, there is a code snippet to do it.

If you need more specific help or if there is anything you don't understand, please let me know.
Cheers,
Maxime.