Skip to main content
Solved

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


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!

 

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

2 replies

Ali H
Forum|alt.badge.img+1
  • Visible
  • 32 replies
  • 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!


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