Multi-Configuration Editor (MCE) Functions#
These functions handle multiple configurations within the same Zemax lens file.
- skZemax.skZemax_subfunctions._MCE_functions.MCE_AddConfig(self, with_pickups: bool = False)[source]#
Adds a new Zemax Configuration.
- Parameters:
with_pickups (bool, optional) – if set to true, add pickups from the previous configuration, defaults to False
- skZemax.skZemax_subfunctions._MCE_functions.MCE_AddConfigOperand(self) ZOSAPI_Editors_MCE_IMCERow[source]#
Adds a new multi-configuration operand to the end of the configuration editor.
- Returns:
The operand object
- Return type:
ZOSAPI_Editors_MCE_IMCERow
- skZemax.skZemax_subfunctions._MCE_functions.MCE_DeleteConfig(self, config_idx: int)[source]#
Deletes a Zemax Configuration.
- Parameters:
config_idx (int) – The index of the MCE to delete.
- skZemax.skZemax_subfunctions._MCE_functions.MCE_DeleteConfigOperand(self, in_op: int | ZOSAPI_Editors_MCE_IMCERow)[source]#
Deletes an multi-configuration operand.
- Parameters:
in_op (Union[int, ZOSAPI_Editors_MCE_IMCERow]) – The multi-configuration operand to delete (object or index).
- skZemax.skZemax_subfunctions._MCE_functions.MCE_GetConfigOperand(self, op_idx: int) ZOSAPI_Editors_MCE_IMCERow[source]#
Gets the multi-configuration operand at index.
- Parameters:
op_idx (int) – The index of the multi-configuration operand
- Returns:
The operand object
- Return type:
ZOSAPI_Editors_MCE_IMCERow
- skZemax.skZemax_subfunctions._MCE_functions.MCE_GetCurrentConfig(self) int[source]#
Gets the currently active configuration index.
- Returns:
The index of the current active configuration.
- Return type:
int
- skZemax.skZemax_subfunctions._MCE_functions.MCE_GetCurrentNumOperands(self) int[source]#
Gets the total number of multi-configuration operands in the current configuration.
- Returns:
The total number of operands
- Return type:
int
- skZemax.skZemax_subfunctions._MCE_functions.MCE_GetNumberOfConfigs(self) int[source]#
Returns the total number of current configurations
- Returns:
The number of configurations within the current Zemax file.
- Return type:
int
- skZemax.skZemax_subfunctions._MCE_functions.MCE_InsertConfig(self, config_idx: int, with_pickups: bool = False)[source]#
Inserts a new Zemax Configuration at index.
- Parameters:
config_idx (int) – if set to true, add pickups from the previous configuration, defaults to False
with_pickups (bool, optional) – _description_, defaults to False
- skZemax.skZemax_subfunctions._MCE_functions.MCE_InsertConfigOperand(self, in_op: int | ZOSAPI_Editors_MCE_IMCERow) ZOSAPI_Editors_MCE_IMCERow[source]#
Inserts a new multi-configuration operand.
- Parameters:
in_op (Union[int, ZOSAPI_Editors_MCE_IMCERow]) – The multi-configuration operand to delete (object or index).
- Returns:
The new operand object.
- Return type:
ZOSAPI_Editors_MCE_IMCERow
- skZemax.skZemax_subfunctions._MCE_functions.MCE_MakeAllSingleConfig(self, deleteMFEOperands: bool = False)[source]#
Removes all configurations and operands. Reduces everything back to a single configuration.
- Parameters:
deleteMFEOperands (bool, optional) – If True, merit function operands of the configurations will be removed, else MFE operands will remain, defaults to False
- skZemax.skZemax_subfunctions._MCE_functions.MCE_SetActiveConfig(self, config_idx: int)[source]#
Sets the active Zemax Configuration.
- Parameters:
config_idx (int) – Index of the configuration to make active
- skZemax.skZemax_subfunctions._MCE_functions.MCE_SetOperand(self, in_op: int | ZOSAPI_Editors_MCE_IMCERow, operand_type: str, param1: int | str | float = 0, param2: int | str | float = 0, param3: int | str | float = 0, operand_values: list[tuple] | None = None) ZOSAPI_Editors_MCE_IMCERow[source]#
Configures the multi-configuration operand. A user is directed to read Zemax documentation (help doc and API doc) - in particular 2.3.4.1. Multi-Configuration Operands.
operand_type: There are a lot of them, just read the documents. param#: operand_values:
- Parameters:
in_op (Union[int, ZOSAPI_Editors_MCE_IMCERow]) – A string identifying the configuration operand.
operand_type (str) – _description_
param1 (Union[int,str,float], optional) – Meaning (if any) comes from operand input (see the docs). 0 seems to be a “null” default of the MCE, defaults to 0
param2 (Union[int,str,float], optional) – Meaning (if any) comes from operand input (see the docs). 0 seems to be a “null” default of the MCE, defaults to 0
param3 (Union[int,str,float], optional) – Meaning (if any) comes from operand input (see the docs). 0 seems to be a “null” default of the MCE, defaults to 0
operand_values (list[tuple], optional) – list of tuples where each tuple is (configuration_number:int, value_of_this_operand:Union[int,str,float]), defaults to None
- Returns:
The operand object
- Return type:
ZOSAPI_Editors_MCE_IMCERow