Skip to main content

Hi all,

I am using a series of cylindrical pipes as detectors to simulate my system. I want to export the text data from the detector viewer for each of the cylindrical pipe detectors.  I added an example file and my script below. Whenever I try to export the data, it will not change the .CFG to the correct detector. I tried setting the detector to the correct object and saving the .CFG but it still would default to a different detector. Any idea how I can export the txt for each object?

 

! Program Variables
detector_number = 4
source_number = 1

!Create config by saving in Detector Analysis window. 
settingsfilename$ = "H:\TEST_FILE.CFG"

! Create a filepath for .txt file
filepath$ = "H:\DATA.txt"

! Clear Detector
clearing = NSDD(1,0,1,1)
    
! Trace Rays
NSTR 1, source_number, 0,0,0,1,0 

! Change detector CFG ot Correct Detector Object
MODIFYSETTINGS settingsfilename$, DVW_DETECTOR , detector_number 

! Opens Detector Viewer
OPENANALYSISWINDOW "Dvr", settingsfilename$
    
! Export Open Detector data to .txt
GETTEXTFILE filepath$, "Dvr", settingsfilename$

@Chris.Ladas 

 

Somehow I cannot download your file.

Anyway, I think if you add the flag value 1, it’ll work:

GETTEXTFILE filepath$, "Dvr", settingsfilename$, 1

From the Help Fille:

Let us know if it works for you.

Take care,

 

David

 


Thank you David!

That fixed my issue.


Reply