Skip to main content
Answer

ZOS_API funtion to check wether a file is in sequential or non-sequential mode

  • April 23, 2020
  • 2 replies
  • 38 views

I am writing a matlab script to export a .zmx as CAD. I'd like it to work with sequential and non-sequential files. Therfore the script should check what mode the file is in. I could only find:

bool ZOSAPI.Tools.General.IExportCAD.SequentialSettingsEnabled

which:

Gets a value indicating whether or not the sequential-only settings are used.

true if the sequentials settings are available; otherwise, false.

Is there no higher level function to get the file's mode?

I feel like that is a somewhat convoluted way to get the mode.

Best answer by Ali H

You can use the mode property of the IOpticalSystem Interface to return the status of the system as an enumeration:

 

 

Then comapre it to the enumeration to yield true or false:

 

TheSystem.Mode == ZOSAPI.SystemType.Sequential

TheSystem.Mode == ZOSAPI.SystemType.NonSequential

 

I hope that helps!

 

2 replies

Ali H
Forum|alt.badge.img+1
  • Visible
  • Answer
  • April 24, 2020

You can use the mode property of the IOpticalSystem Interface to return the status of the system as an enumeration:

 

 

Then comapre it to the enumeration to yield true or false:

 

TheSystem.Mode == ZOSAPI.SystemType.Sequential

TheSystem.Mode == ZOSAPI.SystemType.NonSequential

 

I hope that helps!

 


That is perfect. Thank you very much!