Interface ZOSAPI::Editors::ISolveData
Last update: 13.03.2026
Definition:
Base interface for all solve types. This interface can be accesed via the IEditorCell interface. Note that the S properties are for convenience only and merely cast this interface to the appropriate derived interface. See the OpticStudio documentation for details on the various solve types.
Usage (see Example 15 for a full sample)
C#
// remove all variables and add a F# solve on last surface radius
ILensDataEditor TheLDE = TheSystem.LDE;
IOpticalSystemTools tools = TheSystem.Tools;
tools.RemoveAllVariables();
ILDERow Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);
ISolveData Solver = Surface_Last.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber);
Solver._S_FNumber.FNumber = 3.1415;
Surface_Last.RadiusCell.SetSolveData(Solver);
SampleFile = System.IO.Path.Combine(TheApplication.SamplesDir, @"API\CS\e15_Seq_Optimization\OptimizedFile1.zos");
TheSystem.SaveAs(SampleFile);
C++
// remove all variables and add a F# solve on last surface radius
ILensDataEditorPtr TheLDE = TheSystem->LDE;
//IOpticalSystemTools
IOpticalSystemToolsPtr tools = TheSystem->Tools;
tools->RemoveAllVariables();
ILDERowPtr Surface_Last = TheLDE->GetSurfaceAt(TheLDE->NumberOfSurfaces - 2);
ISolveDataPtr Solver = Surface_Last->RadiusCell->CreateSolveType(SolveType::SolveType_FNumber);
Solver->_S_FNumber->FNumber = 3.1415;
Surface_Last->RadiusCell->SetSolveData(Solver);
SampleFile = _bstr_t(TheApplication->SamplesDir) + "\\API\\\Seq_Optimization\\\OptimizedFile1.zos";
TheSystem->SaveAs(SampleFile);
Matlab
% remove all variables and add a F# solve on last surface radius
TheLDE = TheSystem.LDE;
tools = TheSystem.Tools;
tools.RemoveAllVariables();
Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);
Solver = Surface_Last.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber);
Solver.S_FNumber_.FNumber = 3.1415;
Surface_Last.RadiusCell.SetSolveData(Solver);
SampleFile = System.String.Concat(TheApplication.SamplesDir, '\API\Matlab\e15_Seq_Optimization\OptimizedFile1.zos');
TheSystem.SaveAs(SampleFile);
Python
# remove all variables and add a F# solve on last surface radius
TheLDE = TheSystem.LDE
#IOpticalSystemTools
tools = TheSystem.Tools
tools.RemoveAllVariables()
Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2)
Solver = Surface_Last.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber)
Solver._S_FNumber.FNumber = 3.1415
Surface_Last.RadiusCell.SetSolveData(Solver)
SampleFile = TheApplication.SamplesDir + '\\API\\Python\\e15_Seq_Optimization\\OptimizedFile1.zos'
TheSystem.SaveAs(SampleFile)
Inherited by:
- ZOSAPI.Editors.ISolveAplanatic
- ZOSAPI.Editors.ISolveAutomatic
- ZOSAPI.Editors.ISolveCenterOfCurvature
- ZOSAPI.Editors.ISolveChiefRayAngle
- ZOSAPI.Editors.ISolveChiefRayHeight
- ZOSAPI.Editors.ISolveChiefRayNormal
- ZOSAPI.Editors.ISolveCocentricRadius
- ZOSAPI.Editors.ISolveCocentricSurface
- ZOSAPI.Editors.ISolveCompensator
- ZOSAPI.Editors.ISolveConfigPickup
- ZOSAPI.Editors.ISolveEdgeThickness
- ZOSAPI.Editors.ISolveElementPower
- ZOSAPI.Editors.ISolveFNumber
- ZOSAPI.Editors.ISolveFieldPickup
- ZOSAPI.Editors.ISolveFixed
- ZOSAPI.Editors.ISolveMarginalRayAngle
- ZOSAPI.Editors.ISolveMarginalRayHeight
- ZOSAPI.Editors.ISolveMarginalRayNormal
- ZOSAPI.Editors.ISolveMaterialModel
- ZOSAPI.Editors.ISolveMaterialOffset
- ZOSAPI.Editors.ISolveMaterialSubstitute
- ZOSAPI.Editors.ISolveMaximum
- ZOSAPI.Editors.ISolveNone
- ZOSAPI.Editors.ISolveObjectPickup
- ZOSAPI.Editors.ISolveOpticalPathDifference
- ZOSAPI.Editors.ISolvePickupChiefRay
- ZOSAPI.Editors.ISolvePosition
- ZOSAPI.Editors.ISolvePupilPosition
- ZOSAPI.Editors.ISolveSurfacePickup
- ZOSAPI.Editors.ISolveThermalPickup
- ZOSAPI.Editors.ISolveVariable
- ZOSAPI.Editors.ISolveZPLMacro
Members
- _S_Aplanatic
- _S_Automatic
- _S_CenterOfCurvature
- _S_ChiefRayAngle
- _S_ChiefRayHeight
- _S_ChiefRayNormal
- _S_CocentricRadius
- _S_CocentricSurface
- _S_Compensator
- _S_ConfigPickup
- _S_DuplicateSag
- _S_EdgeThickness
- _S_ElementPower
- _S_FieldPickup
- _S_Fixed
- _S_FNumber
- _S_InvertSag
- _S_MarginalRayAngle
- _S_MarginalRayHeight
- _S_MarginalRayNormal
- _S_MaterialModel
- _S_MaterialOffset
- _S_MaterialSubstitute
- _S_Maximum
- _S_None
- _S_ObjectPickup
- _S_OpticalPathDifference
- _S_PickupChiefRay
- _S_Position
- _S_PupilPosition
- _S_SurfacePickup
- _S_ThermalPickup
- _S_Variable
- _S_ZPLMacro
- IsValid
- Type
Properties
Property IsValid
Definition:
bool ZOSAPI.Editors.ISolveData.IsValid
Gets a value indicating whether the current solve settings are valid.
true if the settings are valid; otherwise, false.
Return type: bool
Property Type
Definition:
SolveType ZOSAPI.Editors.ISolveData.Type
The solve type for this instance.
The instance solve type.
Return type: SolveType
Property _S_None
Definition:
ISolveNone ZOSAPI.Editors.ISolveData._S_None
Return type: ISolveNone
Property _S_Fixed
Definition:
ISolveFixed ZOSAPI.Editors.ISolveData._S_Fixed
Return type: ISolveFixed
Property _S_Variable
Definition:
ISolveVariable ZOSAPI.Editors.ISolveData._S_Variable
Return type: ISolveVariable
Property _S_SurfacePickup
Definition:
ISolveSurfacePickup ZOSAPI.Editors.ISolveData._S_SurfacePickup
Usage (see Example 15 for a full sample)
C#
//Thickness 10 pick up from 1
Solver = Surface10.ThicknessCell.CreateSolveType(ZOSAPI.Editors.SolveType.SurfacePickup);
ISolveSurfacePickup SolverPickup = Solver._S_SurfacePickup;
SolverPickup.Surface = 1;
SolverPickup.ScaleFactor = 1;
SolverPickup.Column = ZOSAPI.Editors.LDE.SurfaceColumn.Thickness;
Surface10.ThicknessCell.SetSolveData(Solver);
SampleFile = System.IO.Path.Combine(TheApplication.SamplesDir, @"API\CS\e15_Seq_Optimization\OptimizedFile3.zos");
TheSystem.SaveAs(SampleFile);
C++
// Thickness 10 pick up from 1
Solver = Surface10->ThicknessCell->CreateSolveType(SolveType::SolveType_SurfacePickup);
ISolveSurfacePickupPtr SolverPickup = Solver->_S_SurfacePickup;
SolverPickup->Surface = 1;
SolverPickup->ScaleFactor = 1;
SolverPickup->Column = SurfaceColumn::SurfaceColumn_Thickness;
Surface10->ThicknessCell->SetSolveData(Solver);
SampleFile = _bstr_t(TheApplication->SamplesDir + "\\API\\CPP\\e15_Seq_Optimization\\OptimizedFile3.zos");
TheSystem->SaveAs(SampleFile);
Matlab
%Thickness 10 pick up from 1
Solver = Surface10.ThicknessCell.CreateSolveType(ZOSAPI.Editors.SolveType.SurfacePickup);
SolverPickup = Solver.S_SurfacePickup_;
SolverPickup.Surface = 1;
SolverPickup.ScaleFactor = 1;
SolverPickup.Column = ZOSAPI.Editors.LDE.SurfaceColumn.Thickness;
Surface10.ThicknessCell.SetSolveData(Solver);
SampleFile = System.String.Concat(TheApplication.SamplesDir, '\API\Matlab\e15_Seq_Optimization\OptimizedFile3.zos');
TheSystem.SaveAs(SampleFile);
Python
# Thickness 10 pick up from 1
Solver = Surface10.ThicknessCell.CreateSolveType(ZOSAPI.Editors.SolveType.SurfacePickup)
SolverPickup = Solver._S_SurfacePickup
SolverPickup.Surface = 1
SolverPickup.ScaleFactor = 1
SolverPickup.Column = ZOSAPI.Editors.LDE.SurfaceColumn.Thickness
Surface10.ThicknessCell.SetSolveData(Solver)
SampleFile = TheApplication.SamplesDir + '\\API\\Python\\e15_Seq_Optimization\\OptimizedFile3.zos'
TheSystem.SaveAs(SampleFile)
Return type: ISolveSurfacePickup
Property _S_ZPLMacro
Definition:
ISolveZPLMacro ZOSAPI.Editors.ISolveData._S_ZPLMacro
Return type: ISolveZPLMacro
Property _S_MarginalRayAngle
Definition:
ISolveMarginalRayAngle ZOSAPI.Editors.ISolveData._S_MarginalRayAngle
Return type: ISolveMarginalRayAngle
Property _S_MarginalRayHeight
Definition:
ISolveMarginalRayHeight ZOSAPI.Editors.ISolveData._S_MarginalRayHeight
Return type: ISolveMarginalRayHeight
Property _S_ChiefRayAngle
Definition:
ISolveChiefRayAngle ZOSAPI.Editors.ISolveData._S_ChiefRayAngle
Return type: ISolveChiefRayAngle
Property _S_MarginalRayNormal
Definition:
ISolveMarginalRayNormal ZOSAPI.Editors.ISolveData._S_MarginalRayNormal
Return type: ISolveMarginalRayNormal
Property _S_ChiefRayNormal
Definition:
ISolveChiefRayNormal ZOSAPI.Editors.ISolveData._S_ChiefRayNormal
Return type: ISolveChiefRayNormal
Property _S_Aplanatic
Definition:
ISolveAplanatic ZOSAPI.Editors.ISolveData._S_Aplanatic
Return type: ISolveAplanatic
Property _S_ElementPower
Definition:
ISolveElementPower ZOSAPI.Editors.ISolveData._S_ElementPower
Return type: ISolveElementPower
Property _S_CocentricSurface
Definition:
ISolveCocentricSurface ZOSAPI.Editors.ISolveData._S_CocentricSurface
Return type: ISolveCocentricSurface
Property _S_CocentricRadius
Definition:
ISolveCocentricRadius ZOSAPI.Editors.ISolveData._S_CocentricRadius
Return type: ISolveCocentricRadius
Property _S_FNumber
Definition:
ISolveFNumber ZOSAPI.Editors.ISolveData._S_FNumber
Usage (see Example 01 for a full sample)
C#
// Solver
ISolveData Solver = Surface_3.RadiusCell.CreateSolveType(SolveType.FNumber);
Solver._S_FNumber.FNumber = 10;
Surface_3.RadiusCell.SetSolveData(Solver);
C++
// Solver
ISolveDataPtr Solver = Surface_3->RadiusCell->CreateSolveType(SolveType_FNumber);
Solver->_S_FNumber->FNumber = 10;
Surface_3->RadiusCell->SetSolveData(Solver);
Matlab
% Solver
Solver = Surface_3.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber);
Solver.FNumber = 10;
Surface_3.RadiusCell.SetSolveData(Solver);
Python
# Solver
Solver = Surface_3.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber)
SolverFNumber = Solver._S_FNumber
SolverFNumber.FNumber = 10
Surface_3.RadiusCell.SetSolveData(Solver)
Return type: ISolveFNumber
Property _S_ChiefRayHeight
Definition:
ISolveChiefRayHeight ZOSAPI.Editors.ISolveData._S_ChiefRayHeight
Return type: ISolveChiefRayHeight
Property _S_EdgeThickness
Definition:
ISolveEdgeThickness ZOSAPI.Editors.ISolveData._S_EdgeThickness
Return type: ISolveEdgeThickness
Property _S_OpticalPathDifference
Definition:
ISolveOpticalPathDifference ZOSAPI.Editors.ISolveData._S_OpticalPathDifference
Return type: ISolveOpticalPathDifference
Property _S_Position
Definition:
ISolvePosition ZOSAPI.Editors.ISolveData._S_Position
Return type: ISolvePosition
Property _S_Compensator
Definition:
ISolveCompensator ZOSAPI.Editors.ISolveData._S_Compensator
Return type: ISolveCompensator
Property _S_CenterOfCurvature
Definition:
ISolveCenterOfCurvature ZOSAPI.Editors.ISolveData._S_CenterOfCurvature
Return type: ISolveCenterOfCurvature
Property _S_PupilPosition
Definition:
ISolvePupilPosition ZOSAPI.Editors.ISolveData._S_PupilPosition
Return type: ISolvePupilPosition
Property _S_MaterialModel
Definition:
ISolveMaterialModel ZOSAPI.Editors.ISolveData._S_MaterialModel
Return type: ISolveMaterialModel
Property _S_MaterialSubstitute
Definition:
ISolveMaterialSubstitute ZOSAPI.Editors.ISolveData._S_MaterialSubstitute
Return type: ISolveMaterialSubstitute
Property _S_MaterialOffset
Definition:
ISolveMaterialOffset ZOSAPI.Editors.ISolveData._S_MaterialOffset
Return type: ISolveMaterialOffset
Property _S_Automatic
Definition:
ISolveAutomatic ZOSAPI.Editors.ISolveData._S_Automatic
Return type: ISolveAutomatic
Property _S_Maximum
Definition:
ISolveMaximum ZOSAPI.Editors.ISolveData._S_Maximum
Return type: ISolveMaximum
Property _S_PickupChiefRay
Definition:
ISolvePickupChiefRay ZOSAPI.Editors.ISolveData._S_PickupChiefRay
Return type: ISolvePickupChiefRay
Property _S_ObjectPickup
Definition:
ISolveObjectPickup ZOSAPI.Editors.ISolveData._S_ObjectPickup
Return type: ISolveObjectPickup
Property _S_ConfigPickup
Definition:
ISolveConfigPickup ZOSAPI.Editors.ISolveData._S_ConfigPickup
Usage (see Example 18 for a full sample)
C#
// An exmple of manually "Make Thermal"
TheSystem.LoadFile(TheApplication.SamplesDir + "\\Sequential\\Objectives\\Doublet.zos", false);
// Add 1 configuration (totally 2)
TheMCE.AddConfiguration(false);
// Add 12 operand (totally 13)
for (int i = 0; i < 12; i++)
TheMCE.AddOperand();
// Create an operand type array and later we will input the array into MCE by a for loop
MultiConfigOperandType[] operandtype = new MultiConfigOperandType[13]{
MultiConfigOperandType.TEMP,
MultiConfigOperandType.PRES,
MultiConfigOperandType.CRVT,
MultiConfigOperandType.THIC,
MultiConfigOperandType.GLSS,
MultiConfigOperandType.SDIA,
MultiConfigOperandType.CRVT,
MultiConfigOperandType.THIC,
MultiConfigOperandType.GLSS,
MultiConfigOperandType.SDIA,
MultiConfigOperandType.CRVT,
MultiConfigOperandType.THIC,
MultiConfigOperandType.SDIA};
// Set parameter 1 for each config operand
int[] param1value = new int[11] { 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 };
for (int i = 0; i < 11; i++)
TheMCE.GetOperandAt(i + 3).Param1 = param1value[i];
// Set type for each config operand
for (int i = 0; i < 13; i++)
TheMCE.GetOperandAt(i + 1).ChangeType(operandtype[i]);
// Set Thermal Pickup solves
ISolveData thermalpickupsolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ThermalPickup);
thermalpickupsolve._S_ThermalPickup.Configuration = 1;
int[] thermalpickup_num = new int[9] { 3, 4, 6, 7, 8, 10, 11, 12, 13 };
foreach (int i in thermalpickup_num)
TheMCE.GetOperandAt(i).GetOperandCell(2).SetSolveData(thermalpickupsolve);
// Set Pickup solve
ISolveData configpickupsolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ConfigPickup);
configpickupsolve._S_ConfigPickup.Configuration = 1;
TheMCE.GetOperandAt(5).GetOperandCell(2).SetSolveData(configpickupsolve);
TheMCE.GetOperandAt(9).GetOperandCell(2).SetSolveData(configpickupsolve);
// Set temperature of configuration 2 to 100 degrees
TheMCE.GetOperandAt(1).GetOperandCell(2).DoubleValue = 100;
ISystemData TheSystemData = TheSystem.SystemData;
TheSystemData.Environment.AdjustIndexToEnvironment = true;
// Save the system
TheSystem.SaveAs(TheApplication.SamplesDir + "\\API\\CS\\e18_Doublet_MakeTermal.zos");
C++
// An exmple of manually "Make Thermal"
TheSystem->LoadFile(TheApplication->SamplesDir + "\\Sequential\\Objectives\\Doublet.zos", false);
// Add 1 configuration (totally 2)
TheMCE->AddConfiguration(false);
// Add 12 operand (totally 13)
for (int i = 0; i < 12; i++)
TheMCE->AddOperand();
// Create an operand type array and later we will input the array into MCE by a for loop
MultiConfigOperandType *operandtype = new MultiConfigOperandType[13]{
MultiConfigOperandType_TEMP,
MultiConfigOperandType_PRES,
MultiConfigOperandType_CRVT,
MultiConfigOperandType_THIC,
MultiConfigOperandType_GLSS,
MultiConfigOperandType_SDIA,
MultiConfigOperandType_CRVT,
MultiConfigOperandType_THIC,
MultiConfigOperandType_GLSS,
MultiConfigOperandType_SDIA,
MultiConfigOperandType_CRVT,
MultiConfigOperandType_THIC,
MultiConfigOperandType_SDIA };
// Set parameter 1 for each config operand
int *param1value = new int[11]{ 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 };
for (int i = 0; i < 11; i++)
TheMCE->GetOperandAt(i + 3)->Param1 = param1value[i];
// Set type for each config operand
for (int i = 0; i < 13; i++)
TheMCE->GetOperandAt(i + 1)->ChangeType(operandtype[i]);
// Set Thermal Pickup solves
ISolveDataPtr thermalpickupsolve = TheMCE->GetOperandAt(1)->GetOperandCell(1)->CreateSolveType(SolveType_ThermalPickup);
thermalpickupsolve->_S_ThermalPickup->Configuration = 1;
int *thermalpickup_num = new int[9]{ 3, 4, 6, 7, 8, 10, 11, 12, 13 };
for (int i = 0; i < 9; i++)
TheMCE->GetOperandAt(thermalpickup_num[i])->GetOperandCell(2)->SetSolveData(thermalpickupsolve);
// Set Pickup solve
ISolveDataPtr configpickupsolve = TheMCE->GetOperandAt(1)->GetOperandCell(1)->CreateSolveType(SolveType_ConfigPickup);
configpickupsolve->_S_ConfigPickup->Configuration = 1;
TheMCE->GetOperandAt(5)->GetOperandCell(2)->SetSolveData(configpickupsolve);
TheMCE->GetOperandAt(9)->GetOperandCell(2)->SetSolveData(configpickupsolve);
// Set temperature of configuration 2 to 100 degrees
TheMCE->GetOperandAt(1)->GetOperandCell(2)->DoubleValue = 100;
ISystemDataPtr TheSystemData = TheSystem->SystemData;
TheSystemData->Environment->AdjustIndexToEnvironment = true;
// Save the system
TheSystem->SaveAs(TheApplication->SamplesDir + "\\API\\CPP\\e18_Doublet_MakeTermal.zos");
#if defined(_DEBUG)
// keeps console open when in debug mode
system("pause");
#endif
Matlab
% An example of manually "Make Thermal"
TheSystem.LoadFile(System.String.Concat(TheApplication.SamplesDir, '\Sequential\Objectives\Doublet.zos'), false);
% Add 1 configuration (totally 2)
TheMCE.AddConfiguration(false);
% Add 12 operands (totally 13)
for i = 0:11
TheMCE.AddOperand();
end
% Create an operand type array and later we will input the array into MCE with a for loop
operandType = NET.createArray('ZOSAPI.Editors.MCE.MultiConfigOperandType', 13);
operandType(1) = ZOSAPI.Editors.MCE.MultiConfigOperandType.TEMP;
operandType(2) = ZOSAPI.Editors.MCE.MultiConfigOperandType.PRES;
operandType(3) = ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT;
operandType(4) = ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC;
operandType(5) = ZOSAPI.Editors.MCE.MultiConfigOperandType.GLSS;
operandType(6) = ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA;
operandType(7) = ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT;
operandType(8) = ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC;
operandType(9) = ZOSAPI.Editors.MCE.MultiConfigOperandType.GLSS;
operandType(10) = ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA;
operandType(11) = ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT;
operandType(12) = ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC;
operandType(13) = ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA;
% Set parameter 1 for each config operand
param1value = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3];
for i = 1:11
TheMCE.GetOperandAt(i + 2).Param1 = param1value(i);
end
% Set type for each config operand
for i = 1:13
TheMCE.GetOperandAt(i).ChangeType(operandType(i));
end
% Set thermal pickup solves
ThermalPickupSolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ThermalPickup);
tPickup = ThermalPickupSolve.S_ThermalPickup_;
tPickup.Configuration = 1;
ThermalPickup_num = [3, 4, 6, 7, 8, 10, 11, 12, 13];
for i = 1:numel(ThermalPickup_num)
TheMCE.GetOperandAt(ThermalPickup_num(i)).GetOperandCell(2).SetSolveData(ThermalPickupSolve);
end
% Set Pickup Solve
ConfigPickupSolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ConfigPickup);
cPickup = ConfigPickupSolve.S_ConfigPickup_;
cPickup.Configuration = 1;
GLSSops = [5, 9]; % Operands 5 and 9 are GLSS operands
for i = 1:numel(GLSSops)
ConfigPickupSolve.S_ConfigPickup_.Operand = GLSSops(i); % Set pickup solve's "operand" value to pickup from correct place
TheMCE.GetOperandAt(GLSSops(i)).GetOperandCell(2).SetSolveData(ConfigPickupSolve); % apply solve for operands 5 and 9
end
% Set temperature of configuration 2 to 100 degrees
TheMCE.GetOperandAt(1).GetOperandCell(2).DoubleValue = 100;
TheSystemData = TheSystem.SystemData;
TheSystemData.Environment.AdjustIndexToEnvironment = true;
TheSystem.SaveAs(System.String.Concat(TheApplication.SamplesDir, '\API\Matlab\e18_Doublet_MakeTermal.zos'));
Python
# An example of manually "Make Thermal"
TheSystem.LoadFile(TheApplication.SamplesDir + "\Sequential\Objectives\Doublet.zos", False)
# Add 1 configuration (totally 2)
TheMCE.AddConfiguration(False)
# Add 12 operands (totally 13)
for i in range(0, 12):
TheMCE.AddOperand()
# Create an operand type array and later we will input the array into MCE with a for loop
operandType = [ZOSAPI.Editors.MCE.MultiConfigOperandType.TEMP, ZOSAPI.Editors.MCE.MultiConfigOperandType.PRES,
ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT, ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC,
ZOSAPI.Editors.MCE.MultiConfigOperandType.GLSS, ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA,
ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT, ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC,
ZOSAPI.Editors.MCE.MultiConfigOperandType.GLSS, ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA,
ZOSAPI.Editors.MCE.MultiConfigOperandType.CRVT, ZOSAPI.Editors.MCE.MultiConfigOperandType.THIC,
ZOSAPI.Editors.MCE.MultiConfigOperandType.SDIA]
# Set parameter 1 for each config operand
param1value = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3]
for i in range(0, 11):
TheMCE.GetOperandAt(i+3).Param1 = param1value[i]
# Set type for each config operand
for i in range(13):
TheMCE.GetOperandAt(i+1).ChangeType(operandType[i])
# Set thermal pickup solves
ThermalPickupSolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ThermalPickup)
ThermalPickupSolve._S_ThermalPickup.Configuration = 1
ThermalPickup_num = [3, 4, 6, 7, 8, 10, 11, 12, 13]
for i in ThermalPickup_num:
TheMCE.GetOperandAt(i).GetOperandCell(2).SetSolveData(ThermalPickupSolve)
# Set Pickup Solve
ConfigPickupSolve = TheMCE.GetOperandAt(1).GetOperandCell(1).CreateSolveType(ZOSAPI.Editors.SolveType.ConfigPickup)
ConfigPickupSolve._S_ConfigPickup.Configuration = 1
GLSSops = [5, 9] # Operands 5 and 9 are GLSS operands
for i in GLSSops:
ConfigPickupSolve._S_ConfigPickup.Operand = i # Set pickup solve's "operand" value to pickup from correct place
TheMCE.GetOperandAt(i).GetOperandCell(2).SetSolveData(ConfigPickupSolve) # apply solve for operands 5 and 9
# Set temperature of configuration 2 to 100 degrees
TheMCE.GetOperandAt(1).GetOperandCell(2).DoubleValue = 100
TheSystemData = TheSystem.SystemData
TheSystemData.Environment.AdjustIndexToEnvironment = True
TheSystem.SaveAs(TheApplication.SamplesDir + "\\API\\Python\\e18_Doublet_MakeTermal.zos")
Return type: ISolveConfigPickup
Property _S_ThermalPickup
Definition:
ISolveThermalPickup ZOSAPI.Editors.ISolveData._S_ThermalPickup
Return type: ISolveThermalPickup
Property _S_FieldPickup
Definition:
ISolveFieldPickup ZOSAPI.Editors.ISolveData._S_FieldPickup
Return type: ISolveFieldPickup
Property _S_DuplicateSag
Definition:
ISolveDuplicateSag ZOSAPI.Editors.ISolveData._S_DuplicateSag
Return type: ISolveDuplicateSag
Property _S_InvertSag
Definition:
ISolveInvertSag ZOSAPI.Editors.ISolveData._S_InvertSag
Return type: ISolveInvertSag