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.
I don’t believe there’s any such tool.
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
You can try to open it Excel and copy-paste rows with radiuses/thickness/glasses to Zemax.
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.
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.
Thanks, you are right, I’ll give it a try.
Charlie
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!
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.