Hello,
I want to push into my model an input file with data regarding new position/ parameters.
When I execute the ZPL code through the GUI (Programing>Edit/Run, F9) it works just fine, but when I try to execute it through the merit function with a ZPLM row it seems that the SETNSCPARAMETER/ SETNSCPOSITION just isn’t working.
I know the MFE is executing the ZPLM since I made a debug output which looks just fine, feels like I’m missing something very basic.
Code snippet:
OPEN INPUT_FILENAME
OUTPUT OUTPUT_FILENAME
READ NUM_OF_PARAMS NUM_OBJ
PRINT NUM_OF_PARAMS, " ", NUM_OBJ
FOR II, 1, NUM_OF_PARAMS, 1
READ PARAM_NUMBER PARAM_VALUE
PRINT PARAM_NUMBER, " ", PARAM_VALUE
SETNSCPARAMETER 1, NUM_OBJ, PARAM_NUMBER, PARAM_VALUE
NEXT
CLOSE
An input/output example of the code above:
## INPUT ##
3 18
1 50
2 50000.0
3 0.005
## OUTPUT ##
3.0000 18.0000
1.0000 50.0000
2.0000 50000.0000
3.0000 0.0050
Edit: Wanted to point out that my ZPL files are located in Zemax/Macros