Solved

Saving ray data ZRD to a file in a loop

  • 14 November 2022
  • 1 reply
  • 202 views

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.

 

icon

Best answer by David.Nguyen 17 November 2022, 12:44

View original

1 reply

Userlevel 7
Badge +2

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