Working with Default Macros

The default macro is a Java macro that is automatically created at the start of each interactive session.

During the interactive session, Simcenter STAR-CCM+ automatically records the Java code for every action in the default macro.



You can use the default macro to repeat the sequence of actions that you performed during the session when you play it using the Play Macro command. A copy of the default macro can be saved through the Simcenter STAR-CCM+ GUI at any point in the simulation.

Default macros make it easier for you to submit cases to Siemens Digital Industries Software support engineers for debugging. However, when sending a macro to a support engineer, also send any initial simulation file or input files that the macro requires.

The path to the directory in which default macros are stored on your system is displayed in the Output window whenever a new session is started, as shown in the preceding screenshot.

Disabling Default Macros

The default macros feature is activated as standard in Simcenter STAR-CCM+, but can be deactivated if desired. As a default macro is generated for each interactive session, it is good practice to empty the default macros directory occasionally to make sure that it does not become cluttered.

To stop the creation of default macros:

  1. Open the Options dialog by selecting Tools > Options in the menu bar.
  2. On the left-hand side of the dialog, select Simcenter STAR-CCM+ > Environment, then on the right-hand side of the dialog, deactivate the Default macros property.


  3. Finally, click Close.

If you need to reactivate the creation of default macros, repeat the above procedure and activate the Default macros property.

Changes that are made to this setting only come into effect in subsequent interactive sessions. For example, when a new simulation is started, or an existing .sim file is opened. The setting is maintained if Simcenter STAR-CCM+ is closed and reopened.

Saving a Default Macro

A copy of the default macro can be saved at any point during the interactive session.

The macro contains every action that is performed in the session up to the point of saving.

To save the default macro:

  1. Select File > Macro > Save Default....


    This action opens the standard, operating system-specific Save dialog.

  2. Navigate to the directory where you want to save a copy of the default macro and give it a name.

    The .java extension is automatically added to the file name.