Scripting and Customization
The Scripting and Customization application settings allow you to specify a default macro directory and select macros to be performed after specific operations in the application.

The events that can be selected to automatically trigger macros are:
- Closing a Model
- Creating a new Model
- Opening an existing Model
- Importing Geometry
- Importing FEM
- Exporting FEM
For each event you may specify a Script Function Name, Function Argument Name, and browse to the Script File Name to be executed when that event occurs. Checkboxes also select whether that script trigger is active and whether output is shown.
For example, you could have a macro run after creating a new Model that defines a standard set of materials, or you could have a macro perform a standard set of geometry cleanup operations after importing geometry. The macros to perform these tasks must be custom written for the desired workflow, but implementing them can be quite helpful. For more information on writing macros, see Scripting API.
Registering Arguments for Scripts
To store a piece of information (such as the filename of an exported file) you can add an argument to the function name that you register to be triggered after a task is performed in MSC Apex (such as PostFEMExport) and then register that argument name with Apex in the "Function Argument Name" field. When your new function gets called by Apex, it will be passed in the argument (in this case the name of an exported file).
- Log in to post comments
