Solved

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

  • 25 April 2019
  • 1 reply
  • 301 views

Userlevel 6
Badge +2

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?


icon

Best answer by Allie 25 April 2019, 01:01

View original

1 reply

Userlevel 6
Badge +2

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