Skip to main content
Solved

ZEMAX file to Code V file conversion

  • November 5, 2019
  • 8 replies
  • 2263 views

Hooman.Akhavan
Hi,

I would like to convert a ZEMAX file to Code V.  However, when I use the zemaxtocv.seq Macro in Code V, I get this message there:
...
The file may be in Unicode format, convert to ANSI and try again

How can I convert a ZEMAX fie format from Unicode to ANSI?  (I should add that my Zemax file has a Non-Sequential component)

Thanks for your help.
Hooman



 

Best answer by Ian

I think what you want is found under
PROJECT PREFERENCES/GENERAL

There you will see ZMX file encoding which can be set to ANSI or Unicode.


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

8 replies

Ian
Forum|alt.badge.img
  • Infrared
  • 14 replies
  • Answer
  • November 5, 2019
I think what you want is found under
PROJECT PREFERENCES/GENERAL

There you will see ZMX file encoding which can be set to ANSI or Unicode.


 

Hooman.Akhavan
Hi Ian,

I did this. Although ZMX to Code V conversion can be done for sequential surfaces now, it looks it is not possible to convert a ZEMAX file with a non sequential component to Code V file.  Is that right? If not, can you explain why I can not convert the attached test zemax file (which is just a Fresnel cylindrical lens) to a Code V file?

Thanks,
Hooman

Mark.Nicholson
Luminary
Forum|alt.badge.img+3
Sounds more like a question for CodeV support, but I suspect CodeV cannot handle the 3D solid models used in NSC mode and can only import sequential surfaces.  

Hooman.Akhavan
Thanks Mark for your feedback.  I will try to ask CodeV support this question.

Best,
Hooman

Vince.Corey
  • Single Emitter
  • 1 reply
  • November 20, 2019
1. Locate the actual (.zmx ) file you are trying to convert.
2. Open this file in Notepad. 
3. There will be script populated.
4. Save the text file as ANSI.
5. Rename the zemax file ( for clarity )to Codev_zemax_xx.zmx
6. Go into CodeV and go to the Macro editor
7. Run the zemaxtocv.seq macro
8. There is no browse file in codev so you will need to locate through windows the renamed file. 
9. Copy and paste the path without ANY spaces in between the name of the directory to file path,
10. Should open now.

Hooman.Akhavan
Hi Vince,

As Mark mentioned the other day, Zemax (with ANSI coding format) to Code V conversion does not look possible if the Zemax file has a non-sequential component. I will also check it out with Code V support.

Best,
Hooman 

Forum|alt.badge.img
  • Ultraviolet
  • 26 replies
  • July 9, 2022
Ian wrote:

I think what you want is found under

PROJECT PREFERENCES/GENERAL



There you will see ZMX file encoding which can be set to ANSI or Unicode.





 

It worked!


Alberto.Donazzan
Ultraviolet

For those who might run into encoding conversion issues in the future, I attach here two simple scripts for batch conversion between Unicode and ANSI encodings. Just run them in the same folder where your zemax files are located.


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