Skip to main content
Solved

How do I save text files without a .txt extension?

  • April 24, 2019
  • 1 reply
  • 550 views

Allie
Zemax Staff
Forum|alt.badge.img+2
  • Zemax Staff
  • 337 replies

I'm trying to write a ZPL macro in Notepad but I can't figure out how to save the file with the .zpl extension. Every time I try to save, the file name ends up looking like "MyMacro.zpl.txt". How can I change this?


Best answer by Allie

OpticStudio uses ASCII and UNICODE text files with unique extensions for various purposes - including writing a NSC polygon object (POB), user-defined aperture (UDA), and a Zemax Programming Language macro (ZPL). Luckily, saving these file types is easy when working in standard Windows programs, such as Microsoft Notepad. 



In Notepad, the save dialog contains two options for the file type: “Text Documents (*.txt)” and “All Files”. If the type is text document, you must specify the file name and extension in quotes. For example, to save a macro named “MACRO” with a ZPL extension, you would type the name as seen below.











If the file type is set to “All Files”, the quotes aren’t needed, but the extension must still be specified, as seen below.











Following these naming conventions and placing the files in the correct folder will ensure that OpticStudio is able to correctly interpret your file!


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

1 reply

Allie
Zemax Staff
Forum|alt.badge.img+2
  • Author
  • Zemax Staff
  • 337 replies
  • Answer
  • April 24, 2019

OpticStudio uses ASCII and UNICODE text files with unique extensions for various purposes - including writing a NSC polygon object (POB), user-defined aperture (UDA), and a Zemax Programming Language macro (ZPL). Luckily, saving these file types is easy when working in standard Windows programs, such as Microsoft Notepad. 



In Notepad, the save dialog contains two options for the file type: “Text Documents (*.txt)” and “All Files”. If the type is text document, you must specify the file name and extension in quotes. For example, to save a macro named “MACRO” with a ZPL extension, you would type the name as seen below.











If the file type is set to “All Files”, the quotes aren’t needed, but the extension must still be specified, as seen below.











Following these naming conventions and placing the files in the correct folder will ensure that OpticStudio is able to correctly interpret your file!



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