8
$\begingroup$

How can the contents of the Palettes menu be refreshed (preferably programmatically) without restarting the Front End?

When droppping a new palette notebook into $UserBaseDirectory/SystemFiles/FrontEnd/Palettes, it will appear in the Palettes menu after restarting the Front End. How can I make it appear there without restarting the front end?

When using the Palettes -> Install Palette... feature, this refresh happens automatically, so I assume it must be possible. The source of the installation dialog notebook is available in $InstallationDirectory/SystemFiles/FrontEnd/SystemResources, but I did not manage to figure out how it works yet.

$\endgroup$
2
  • 1
    $\begingroup$ I think it is already (although tangentially) answered here mathematica.stackexchange.com/a/2611/193 $\endgroup$ Commented Jul 21, 2012 at 15:00
  • $\begingroup$ @belisarius Good find! $\endgroup$ Commented Jul 21, 2012 at 15:10

1 Answer 1

9
$\begingroup$

You can use the following command to programmatically refresh the contents of the menus in Mathematica:

MathLink`CallFrontEnd[FrontEnd`ResetMenusPacket[{Automatic, Automatic}]] 

This was mentioned by John Fultz in this MathGroup post as well as this answer.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.