We can use the below code to close the current analysis result and analyze the new filed. The setting file must be created by clicking the Save button.
Stngs$="C:\Users\yuan.chen\Documents\Zemax\Configs\TFM.CFG"
CLOSEWINDOW WINL()
MODIFYSETTINGS Stngs$,TFM_FIELD,3,"TFM"
Openanalysiswindow "tfm",Stngs$
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/7ae184cc-8bf9-416a-b77a-3173ad300e12.png)