Skip to main content
Question

Openning zmx creates lots od firectories

  • Jun 23, 2025 12:25 PM UTC
  • 9 replies
  • 144 views

mocquin
Ultraviolet

I have several zmx files in a folder, but only one of them creates lots of fempty olders when I open it while all others don’t. What is it that determines the behavior of a zmx file regarding folders like Apertures, CAD Files, etc

 

 

I tried turning off projectdirectory with the API but still the folders are created. 

9 replies

Forum|alt.badge.img
  • Fully Spectral
  • Jun 23, 2025 2:32 PM UTC

Hi Mocquin,
This is determined by the “Project Directory” options, in the “File“ menu bar and in the System Explorer
 

You can also access the opiotn in the zmx file, close to the top, with the line:
IWDP 1
1 means activated, 0 means deactivated.


mocquin
Ultraviolet
  • Author
  • Ultraviolet
  • Jun 23, 2025 3:07 PM UTC

Yes I know, so I deactivated the “project directory” option, but it still creates new empty folders when I open the zmx file


Sean Turner
Fully Spectral
Forum|alt.badge.img+1
  • Fully Spectral
  • Jun 23, 2025 5:20 PM UTC

The ZMX file creating extra directories was saved as a lens project. The others were not. You can open it and convert back to a lens file from a lens project and it will not create the extra directories in the future. 


mocquin
Ultraviolet
  • Author
  • Ultraviolet
  • Jun 24, 2025 7:42 AM UTC

Thanks ​@Sean Turner but I’m not sure what you mean by “convert back to a lens file” ?

As of now, when I open the zmx file, it creates said folders, and the toolbar looks like this : 

and the file is not a “project directory” : 

 


Forum|alt.badge.img
  • Fully Spectral
  • Jun 24, 2025 8:07 AM UTC

Hi Mocquin,

If you open the file in a text editor, does it say
IWDP 1
or
IWDP 0
at the top ?
If 1, set it to 0 or remove the line (use a copy of the file if you want to be safe)


mocquin
Ultraviolet
  • Author
  • Ultraviolet
  • Jun 24, 2025 8:10 AM UTC

Line 5 in the file is : 

IWDP 0


mocquin
Ultraviolet
  • Author
  • Ultraviolet
  • Jun 24, 2025 8:13 AM UTC

Is it possible this comes from the fact that the file contains a blackbox row ?


David.Nguyen
Luminary
Forum|alt.badge.img+2

​@mocquin 

 

I don’t know if it will help but you can also try what ​@Sandrine Auriol suggested here:

That is, with the ZOS-API:

TheSystem=TheApplication.PrimarySystem
TheSystem.TurnOffProjectDirectory()

I’m not sure if it does anything different than switching to IWDP 0.

Take care,

 

David


mocquin
Ultraviolet
  • Author
  • Ultraviolet
  • Jun 24, 2025 8:58 AM UTC

​@David.Nguyen  Yes I already tried that as well, with no effect...