Skip to main content
Solved

Prescription data import


Forum|alt.badge.img

I have been asked to re-create a Zemax design from 2007.  All they have is the Prescription data text file.  Is there  a tool to import this data from the ascii file?  I think I saw such a feature, but can’t find it now in OS.  I enter the data manually, but direct import/conversion would be easier & more accurate.

Best answer by Mark.Nicholson

I don’t believe there’s any such tool.

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

8 replies

Mark.Nicholson
Luminary
Forum|alt.badge.img+3

I don’t believe there’s any such tool.


Forum|alt.badge.img

Thanks Mark, I had a faint recollection that a tool existed, but it could have been a dream-wish.  Maybe some user has made one themselves.

Seems like it would be easy to reverse what they do when they create the Rx data file.  I’m slowly doing it by the old hunt & peck method:(

Charlie


Forum|alt.badge.img

You can try to open it Excel and copy-paste rows with radiuses/thickness/glasses to Zemax.


Forum|alt.badge.img

Thanks Andrey, I’m using the cut/paste method with a text editor.  I thought someone might have created a tool to parse the Rx files.  I thought I had seen one, but can’t remember where.


Forum|alt.badge.img

I see. But if you use a text editor you need to copy value by value. In Excel you can copy several values so you’ll get less steps. 


Forum|alt.badge.img

Thanks, you are right, I’ll give it a try.

Charlie


Sean Turner
Ultraviolet
Forum|alt.badge.img+1
  • Ultraviolet
  • 91 replies
  • February 5, 2024

You could write a ZPL macro to read the values from the text file. I guess it comes down to whether this is a one-time effort to determine if it would be an efficient solution for you. I used to have a macro for this purpose when I was responsible for updating my company’s lens catalog. Good luck!


David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1097 replies
  • February 5, 2024

In this post:

I have a Python code snippet that I used to parse a patent lens, and fill my lens file accordingly with the ZOSAPI. Its a bit rough but I guess it could be a starting point.

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