Solved

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

  • 23 April 2020
  • 2 replies
  • 26 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.

icon

Best answer by Ali H 24 April 2020, 09:12

View original

2 replies

Badge +1

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