Skip to main content
Solved

Change solve type on thickness using Matlab


Jonathan.Bumstead

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

Best answer by Csilla Timar-Fulep

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!

 

View original
Did this topic help you find an answer to your question?

2 replies

Csilla Timar-Fulep
Zemax Staff
Forum|alt.badge.img+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!

 


Jonathan.Bumstead

This was very helpful. Thanks for your reply.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings