Hi all,
I want to save data and images of detectors automatically with ZPL.
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/e77fd7fa-df96-4923-8a46-d1947942a065.png)
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/714df8a7-0c40-4728-8c2a-867ef1093788.png)
So I made the ZPL code as below.
For n = 2, 6, 1
####### get Detector viewer in img.
winnum = n+1
OpenAnalysisWindow "Dvr", cfgpath$
ExportJPG winnum, imgfile$
####### get Detector viewer in dat.
#ModifySettings cfgtxt$, DVW_SHOW, 1 # extraction middle row data from 2d data
GetTextFile datfile$, "Dvr", cfgtxt$ , 1
ConvertFileFormat datfile$, 1 #Unicode to ANSI
Next
Once I open all detector viewer windows, I tried to save images and data in detector number order.
However, I couldn’t save each detector data/image because it cannot recognize the number of detector in this code.
What should I do?
Or, are there better method to do it?
Please help me.
Thanks in advance.
Best answer by Allie
View original