22. Scripting and Customization

The following enhancements to scripting and customization were made at Release 2025 R2:

  • To keep Mechanical application state calculations efficient, re-computation of data model objects is sometimes suppressed. This can result in objects not being in their expected states after data model changes are made via scripting. This especially affects the callbacks associated with the following events in the Mechanical application:

    • Before geometry is updated

    • After geometry is updated

    • Before a solve starts

    • After a solve is finished

    • Before post processing is started

    • After post processing is finished

    A new API call, DataModel.RecomputeStates() can be run after these callbacks have finished executing to recompute and update the states of the objects in the data model.