Solved

Change solve type on thickness using Matlab

  • 12 May 2020
  • 2 replies
  • 131 views

Hello,


I'd like to run two different optimizations with different merit functions through Matlab. Before running the second optimization, I need to change the Solve Type of some thicknesses and radii to variables. The following code provides the current solve type, but it is a read-only property. Is there some way to change the solve type using Matlab? 


TheLDE = TheSystem.LDE;


S1_CollSolve = TheLDE.GetSurfaceAt(52);


S1_CollSolve.ThicknessCell.Solve


Thanks for your help.


Best,


Jon

icon

Best answer by Csilla Timar-Fulep 12 May 2020, 10:25

View original

2 replies

Userlevel 5
Badge +2

Hello Jon,


Thanks for your question!


In order to change the solve type, first you have to create a new solve type by the CreateSoveType member function of the ZOSAPI.Editors.IEditorCell interface using the SolveType enumeration of the ZOSAPI.Editors namespace, please see it below:



Then, you can set the new solve type by the SetSolveData member function ZOSAPI.Editors.IEditorCell interface.


Please find two examples below, the first one shows how to set an F# solve, while the second shows how to set thermal and config pickup solves:




You may find further examples in Examples 15 and 18.


I hope this helps!


If you have further questions please ask and we will be happy to help!


 

This was very helpful. Thanks for your reply.

Reply