Skip to main content

ZOS-API interface 2024 R1

ZOSAPI.Editors.MFE.IMFERow Interface Reference

Last update: 17.07.2025

All data for a Merit Function Editor operand. This interface can be accessed via the IMeritFunctionEditor interface. More...

Inheritance diagram for ZOSAPI.Editors.MFE.IMFERow:

Public Member Functions

IEditorCell GetOperandCell (MeritColumn Col)
 Gets the specified operand cell data.
 
MeritOperandType[] AvailableOperandTypes ()
 
bool ChangeType (MeritOperandType type)
 Changes to the specified operand type.
 
- Public Member Functions inherited from ZOSAPI.Editors.IEditorRow
IEditorCell GetCellAt (int pos)
 Gets the cell at the specified index (IEditor.MinColumn to IEditor.MaxColumn).
 

Properties

bool IsActive [get]
 Gets a value indicating whether this instance is active (i.e. refers to a valid operand in the system).
 
int OperandNumber [get]
 Gets the operand number for this row.
 
string TypeName [get]
 
MeritOperandType Type [get]
 Gets the current operand type. Use ChangeType to change the operand type.
 
ZemaxColor RowColor [get, set]
 
double Target [get, set]
 
IEditorCell TargetCell [get]
 
double Weight [get, set]
 
IEditorCell WeightCell [get]
 
double Value [get]
 
IEditorCell ValueCell [get]
 
double Contribution [get]
 
IEditorCell ContributionCell [get]
 
- Properties inherited from ZOSAPI.Editors.IEditorRow
IEditor Editor [get]
 Gets the editor this row was retrieved from.
 
bool IsValidRow [get]
 Gets a value indicating whether this instance is currently valid. Note that the RowIndex for this object is fixed, so removing one or more rows from the editor may cause it to be invalid.
 
int RowIndex [get]
 Gets the index of this row in the editor.
 
string RowTypeName [get]
 Gets the type of this row; this can be a surface for the LDE, object for the NCE, etc.
 
string Bookmark [get, set]
 

Detailed Description

All data for a Merit Function Editor operand. This interface can be accessed via the IMeritFunctionEditor interface.

Examples
CSharpStandalone_03_open_file_and_optimise.cs.

Member Function Documentation

◆ AvailableOperandTypes()

MeritOperandType[] ZOSAPI.Editors.MFE.IMFERow.AvailableOperandTypes ( )

◆ ChangeType()

bool ZOSAPI.Editors.MFE.IMFERow.ChangeType ( MeritOperandType  type)

Changes to the specified operand type.

Parameters
typeThe type.
Returns
Examples
CSharpStandalone_03_open_file_and_optimise.cs.

◆ GetOperandCell()

IEditorCell ZOSAPI.Editors.MFE.IMFERow.GetOperandCell ( MeritColumn  Col)

Gets the specified operand cell data.

Parameters
ColThe column.
Returns

Property Documentation

◆ Contribution

double ZOSAPI.Editors.MFE.IMFERow.Contribution
get

◆ ContributionCell

IEditorCell ZOSAPI.Editors.MFE.IMFERow.ContributionCell
get

◆ IsActive

bool ZOSAPI.Editors.MFE.IMFERow.IsActive
get

Gets a value indicating whether this instance is active (i.e. refers to a valid operand in the system).

true if this instance is active; otherwise, false.

◆ OperandNumber

int ZOSAPI.Editors.MFE.IMFERow.OperandNumber
get

Gets the operand number for this row.

The operand number.

◆ RowColor

ZemaxColor ZOSAPI.Editors.MFE.IMFERow.RowColor
getset

◆ Target

double ZOSAPI.Editors.MFE.IMFERow.Target
getset

Usage (see Example 03 for a full sample)

C#

// Merit functions
IMeritFunctionEditor TheMFE = TheSystem.MFE;
IMFERow Operand_1 = TheMFE.GetOperandAt(1);
Operand_1.ChangeType(MeritOperandType.ASTI);
Operand_1.Target = 0.0;
Operand_1.Weight = 10.0;
All data for a Merit Function Editor operand. This interface can be accessed via the IMeritFunctionEd...
Definition: InterfacesMFE.cs:696
bool ChangeType(MeritOperandType type)
Changes to the specified operand type.
This interface defines all properties and methods needed to interact with the MRit Function Editor....
Definition: InterfacesMFE.cs:491
IMFERow GetOperandAt(int OperandNumber)
Gets the data for the specified operand.
MeritOperandType
All supported Merit Function operands.
Definition: InterfacesMFE.cs:19

C++

// Merit functions
IMeritFunctionEditorPtr TheMFE = TheSystem->MFE;
IMFERowPtr Operand_1 = TheMFE->GetOperandAt(1);
Operand_1->ChangeType(MeritOperandType_ASTI);
Operand_1->Target = 0.0;
Operand_1->Weight = 10.0;

Matlab

% Merit functions
TheMFE = TheSystem.MFE;
Operand_1 = TheMFE.GetOperandAt(1);
Operand_1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.ASTI);
Operand_1.Target = 0.0;
Operand_1.Weight = 10.0;
Definition: InterfacesMFE.cs:12
Definition: InterfacesEditors.cs:12
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

Python

# Merit functions
TheMFE = TheSystem.MFE
Operand_1 = TheMFE.GetOperandAt(1)
Operand_1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.ASTI)
Operand_1.Target = 0.0
Operand_1.Weight = 10.0

◆ TargetCell

IEditorCell ZOSAPI.Editors.MFE.IMFERow.TargetCell
get

◆ Type

MeritOperandType ZOSAPI.Editors.MFE.IMFERow.Type
get

Gets the current operand type. Use ChangeType to change the operand type.

The type.

◆ TypeName

string ZOSAPI.Editors.MFE.IMFERow.TypeName
get

◆ Value

double ZOSAPI.Editors.MFE.IMFERow.Value
get

◆ ValueCell

IEditorCell ZOSAPI.Editors.MFE.IMFERow.ValueCell
get

◆ Weight

double ZOSAPI.Editors.MFE.IMFERow.Weight
getset

Usage (see Example 03 for a full sample)

C#

// Merit functions
IMeritFunctionEditor TheMFE = TheSystem.MFE;
IMFERow Operand_1 = TheMFE.GetOperandAt(1);
Operand_1.ChangeType(MeritOperandType.ASTI);
Operand_1.Target = 0.0;
Operand_1.Weight = 10.0;

C++

// Merit functions
IMeritFunctionEditorPtr TheMFE = TheSystem->MFE;
IMFERowPtr Operand_1 = TheMFE->GetOperandAt(1);
Operand_1->ChangeType(MeritOperandType_ASTI);
Operand_1->Target = 0.0;
Operand_1->Weight = 10.0;

Matlab

% Merit functions
TheMFE = TheSystem.MFE;
Operand_1 = TheMFE.GetOperandAt(1);
Operand_1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.ASTI);
Operand_1.Target = 0.0;
Operand_1.Weight = 10.0;

Python

# Merit functions
TheMFE = TheSystem.MFE
Operand_1 = TheMFE.GetOperandAt(1)
Operand_1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.ASTI)
Operand_1.Target = 0.0
Operand_1.Weight = 10.0

◆ WeightCell

IEditorCell ZOSAPI.Editors.MFE.IMFERow.WeightCell
get

Connect with Ansys