Solved

Getting the row's Value column in MFE using ZOS-API

  • 11 April 2022
  • 2 replies
  • 176 views

Badge +1

Hi

I am learning how to build the MFE with ZOS-API and for that I am creating a simple MFE. I know that Target and Weight are accessible through 

 

Operand.Weight

Operand.Target

 

But calling the Value column using

 

Operand.Value

 

returns 0.

 

Any idea what I am doing wrong?

 

Thanks

 

icon

Best answer by MichaelH 11 April 2022, 18:44

View original

2 replies

Userlevel 6
Badge +2

Hi Amin,

Did you call TheSystem.MFE.CalculateMeritFunction() before Operand.Value?  Before OpticStudio calculates the value of an operand, it will always be 0 and you need to refresh the MFE to get the actual value.

~Michael

Badge +1

Hi Amin,

Did you call TheSystem.MFE.CalculateMeritFunction() before Operand.Value?  Before OpticStudio calculates the value of an operand, it will always be 0 and you need to refresh the MFE to get the actual value.

~Michael

Thanks Michael. I did not know to use this function. Problem solved.

Reply