Hi Gabriele,
Thanks for your question here!
You will need to use the GetCellAt member function of the ZOSAPI.Editors.IEditorRow Interface Reference, and then on the resulting IEditorCell instance, you will need to use the CreateSolveType function of the ZOSAPI.Editors.IEditorCell Interface Reference to create a solver. Once the solver is created, you may set up its parameters. And then, finally, you can apply the solver on the cell you want to by using the SetSolveData member function of the ZOSAPI.Editors.IEditorCell Interface Reference. Please note, that the input of the GetCellAt function is the column number not the parameter number.
The process is shown in detail with reference code in Example 07 - Tilt and Decenter Elements. In this example, pick-up solves are set on a Coordinate Break surface.
You may find further references about how to set up for pick-up solves on other common columns for all surface types (i.e. thickness, radius, etc.) in Example 15 - Sequential Optimization. In this example a pick-up solve is set on the thickness parameter:
In your case the code will look like this:
ParameterPickup = TheSystem.LDE.GetSurfaceAt(21).GetCellAt(29).CreateSolveType(ZOSAPI.Editors.SolveType.SurfacePickup);
ParameterPickup.S_SurfacePickup_.Surface = 17;
ParameterPickup.S_SurfacePickup_.ScaleFactor = 1;
ParameterPickup.S_SurfacePickup_.MakePickupFromCurrentColumn();
TheSystem.LDE.GetSurfaceAt(21).GetCellAt(29).SetSolveData(ParameterPickup);
I hope this help, but if you have further questions, please let us know and we will be happy to help!
Best,
Csilla
Dear Csilla,
Thanks a lot for your explanation, it worked perfectly.
Best regards
Gabriele