Macro Recording in Simulation

You can record operations performed with the SOLIDWORKS Simulation user interface in a macro script.

With macro recording you can capture these tasks for static and nonlinear studies:
  • Create studies
  • Define study properties (static studies)
  • Apply material
  • Apply loads and boundary conditions
  • Create Mesh and Mesh Control
  • Run the study
  • Create Plots

Following is a list of loads and boundary conditions supported for macro recording:

Pressure, Gravity, Centrifugal, Bearing load, Temperature, Convection, Heat flux, Heat power, Radiation, Distributed mass, Uniform and selected base excitation, Fixtures, Drop test setup, Manual contact definitions (only with entity selection not automatically detected contacts), and Component contacts.

Macro operations are accessed from the Macro toolbar or the Tools > Macro menu. Recorded macros are saved as .swp Visual Basic for Applications (VBA) project files.