Skip to main content
Solved

read data from geometric image analyze in a macro

  • April 26, 2024
  • 2 replies
  • 122 views

Fredrik valfridsson

To speed up a macro I need to read out data from certain pixels from the geometric image analyze in a macro.

how do i do that

Best answer by yuan.chen

Hi Fredrik, you get use the sample code below to extract the efficiency, it’s similar to go to the desired line. However, I am not sure if it’s the most efficient way.

! Get a temporary file name
A$ = $TEMPFILENAME()
! Compute the data and place in the temp file
GETTEXTFILE A$, Ima
! Open the new file and print it out
OPEN A$
for i,1,27,1
READSKIP -2
i = i+1
next
Read A,B,C,D
print D

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

2 replies

yuan.chen
Zemax Staff
Forum|alt.badge.img+3
  • Zemax Staff
  • 275 replies
  • Answer
  • April 29, 2024

Hi Fredrik, you get use the sample code below to extract the efficiency, it’s similar to go to the desired line. However, I am not sure if it’s the most efficient way.

! Get a temporary file name
A$ = $TEMPFILENAME()
! Compute the data and place in the temp file
GETTEXTFILE A$, Ima
! Open the new file and print it out
OPEN A$
for i,1,27,1
READSKIP -2
i = i+1
next
Read A,B,C,D
print D


Fredrik valfridsson

thank you yuan

this helped

depending on how many rays I use this fastened up my macro a lot

 


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