Share

Application.LoadMainMenu Method

Description

Changes the currently loaded main menu.

Visual Basic

Public static Function LoadMainMenu(
    filename As string
) As bool

C#

public static bool LoadMainMenu(
    string filename
);

Parameters

Parameters Description
string filename The menu filename. Can be provided with or without a path, though if provided without a path, it is expected that the file is located on the current support files search path. The method call is rejected if null or the empty string; to unload the main menu, supply "." .

Returns

True if successful, false if not. Possible errors: File can't be found.

Remarks

Does not change the current Enterprise menu. If the menu file is not found at the path provided, or if the filename has no path, performs a search for the menu file on the support files search path. Loads the new menu as the main menu, and any partial menus listed by this menu. Functionality is identical to using the MENU command. If "." is supplied, the main menu is unloaded.

Links

Application Class, Autodesk.AutoCAD.ApplicationServices Namespace

Was this information helpful?