Your Partner in Simulation Technology

How to setup menu buttons for custom scripts in MSC Apex

Published 2020-03-06
When you have scripts that you often use, or you have a long lists of scripts you wish to access now and again, you don't want to go search for them in Windows Explorer. 
MSC Apex has the option for you add your own menu items and even to create forms for your scripts to run as if they are standard features in MSC Apex.

How to add scripts to the menu bar

Watch the video below or follow the steps further down.

Step 1: Activate the custom script option

Under Options > Application Settings > Scripting... , tick the Enable Custom Tool Palette.

This step makes the custom toolbox icon available on the right hand menu.

Step 2: Edit the custom toolbox

Open the Custom tool palette and click edit.

Step 3: Add script

When the Edit button shows the Done button (Don't click it yet), 
Right-click on an empty space and select the "Add Tool" option.

Step 4: Link script files to a button

Link the icon image file as well as the script file.
Note that if the script consist of two Python files as in this case, the file name which includes "" is the one to link and then the "UIMacro" tick box must be ticked. This means that the script has a UI (User Interface, aka form) which provides you the option to provide your own input for the script when running it.

Step 5: Apply, followed by Done

Click Apply and then Done. 

Now your custom tool is available for use

NB: Backup your custom tool palette XML file regularly, especially if you plan to move to another domain user, or computer, or start with a fresh install of MSC Apex. 

The file is located in:
C:Users(your user)AppDataLocalMSCMSC_Apex

Tip: Ensure that hidden items are shown to access the AppData folder.

I think this is...

crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram