Skip to main content
Solved

Saving ray data ZRD to a file in a loop

  • November 14, 2022
  • 1 reply
  • 312 views

pemax310

Hello together,

I’m trying to save Ray Database ZRD to a file in a loop for each angle in the following script:

...

for angle, -10, 10, 2
                x = NSDD (1,0,0,0) 
                SETNSCPOSITION 1,2,6,angle
                PATHRAY$ = "Rayfile_" + $Str(angle) + ".ZRD"
                NSTR 1,0,1,1,1,1,1,1,PATHRAY$,"h133",1 
                UPDATE ALL
                PAUSE THREADS
NEXT

 

This just a part of my script, and exactly this part, namely the saving of ray database is not working. How can I save it, so I could have a few Ray Database files for different angles and open it later with the Ray Database Viewer? What is wrong here?

Thank you in advance!

Cheers

Max.

 

Best answer by David.Nguyen

Hi pemax310,

 

This macro works fine for me in a dummy file.

What do you mean when you say it is not working? Are you aware that the files are saved in the same folder as your lens file? Could you share a file that illustrates the issue?

Take care,

 

David

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

1 reply

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1112 replies
  • Answer
  • November 17, 2022

Hi pemax310,

 

This macro works fine for me in a dummy file.

What do you mean when you say it is not working? Are you aware that the files are saved in the same folder as your lens file? Could you share a file that illustrates the issue?

Take care,

 

David


Reply


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