Solved
Automate detector output from OpticStudio Professional or Standard
How do I save detector output in nonsequential mode from 30 different detectors. They are listed in series in the NSC editor from 5-30. I would like to save the text full pixel output of the files as d0.txt thru d29 by changing the detector viewer from detector 5-35 detector element in the NSC editor.
-----------------------
!code attempt 1
!A$= $d0.txt #or
A$= "d0.txt"
GETTEXTFILE A$, DVW_DETECTOR, 5 #outputs detector 5 to text file
A$= "d1.txt"
GETTEXTFILE A$, DVW_DETECTOR, 6
...
-----------------------------
!code attempt 2
!Incorporating for loop:
DETECTORSTART=5
DETECTOREND=36
TXTFILESTART=0
TXTFILEEND=30
!A$= $d0.txt()
DETECTORCOUNT=DETECTORSTART
FOR i, TXTFILESTART, TXTFILEEND, 1
A$= "d" + i + ".txt"
GETTEXTFILE A$, DVW_DETECTOR, DETECTORCOUNT #outputs detector to text file
DETECTORCOUNT = DETECTORCOUNT +1
NEXT
-----------------------------
Do I need to use MODIFYSETTINGS SETTINGFILENAME, TYPE, VALUE to change detectorviewer detector?
Such as MODIFYSETTINGS SETTINGFILE$, DVW_DETECTOR, DETECTORCOUNT ?
-----------------------
!code attempt 1
!A$= $d0.txt #or
A$= "d0.txt"
GETTEXTFILE A$, DVW_DETECTOR, 5 #outputs detector 5 to text file
A$= "d1.txt"
GETTEXTFILE A$, DVW_DETECTOR, 6
...
-----------------------------
!code attempt 2
!Incorporating for loop:
DETECTORSTART=5
DETECTOREND=36
TXTFILESTART=0
TXTFILEEND=30
!A$= $d0.txt()
DETECTORCOUNT=DETECTORSTART
FOR i, TXTFILESTART, TXTFILEEND, 1
A$= "d" + i + ".txt"
GETTEXTFILE A$, DVW_DETECTOR, DETECTORCOUNT #outputs detector to text file
DETECTORCOUNT = DETECTORCOUNT +1
NEXT
-----------------------------
Do I need to use MODIFYSETTINGS SETTINGFILENAME, TYPE, VALUE to change detectorviewer detector?
Such as MODIFYSETTINGS SETTINGFILE$, DVW_DETECTOR, DETECTORCOUNT ?
Best answer by Mark.Nicholson
Hey Jeff,
I'd use the SAVEDETECTOR keyword. Syntax is just

View originalI'd use the SAVEDETECTOR keyword. Syntax is just
SAVEDETECTOR surf, object, filenameYou can then use the files with LOADDETECTOR and the UI features:

Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.