Simulation API - Save settings without meshing

Hello everyone,

I'm trying to prepare several static simulation studies via api to later run a bunch of them via task scheduler.

When trying to save the mesh settings, I am encountering the following problem:

Although I am setting the SaveSettingsWithoutMeshing - property to 1, Solidworks is still somehow computing anything.

Even with the property on, a CWR file was created and when trying to save the mesh settings with a finer mesh size, Solidworks need more time to run the CreateMesh command.

Here is my code for meshing the part:

// Mesh

cwMesh = (CWMesh)Study.Mesh;

cwMesh.Quality = 1;

cwMesh.SaveSettingsWithoutMeshing = 1;

cwMesh.GetDefaultElementSizeAndTolerance((int)swsLinearUnit_e.swsLinearUnitMillimeters, out double def_size, out def_tol);

errCode = Study.CreateMesh((int)swsLinearUnit_e.swsLinearUnitMillimeters, custSize, def_tol);

Does anybody have a similar experience with the meshing or can tell me how to solve my problem?

Regards,

Tobias

SolidworksApi/macros