Skip to main content
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











 
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.








 
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
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.  
Thanks Mark for your feedback.  I will try to ask CodeV support this question.





Best,


Hooman
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.
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 

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!


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