Skip to main content
Solved

Getting text file from object detecotr

  • February 10, 2025
  • 2 replies
  • 103 views

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$

Best answer by David.Nguyen

@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

 

View original
Did this topic help you find an answer to your question?

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1089 replies
  • Answer
  • February 13, 2025

@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

 


  • Author
  • Infrared
  • 5 replies
  • February 13, 2025

Thank you David!

That fixed my issue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings