ZOSAPI.IOpticalSystem Interface Reference
Last update: 17.07.2025Represent a complete optical system. A IOpticalSystem corresponds to a single .ZMX file. See IZOSAPI_Application for information on how to get or create a IOpticalSystem. More...
Public Member Functions | |
| string | GetCurrentStatus () |
Gets the last status of the optical system. If null or the length is 0, then the system has no errors. | |
| string | UpdateStatus () |
| Forces the an update of the system, and returns the current status. | |
| bool | MakeSequential () |
| Sets the current system to sequential mode if it is not already. | |
| bool | MakeNonSequential () |
| Makes the system non-sequential if it is not already. Note that any sequential data will be lost. | |
| bool | LoadFile (string LensFile, bool saveIfNeeded) |
| Replaces the current system with data from the specified file. | |
| void | New (bool saveIfNeeded) |
| Clears all data in the current system and resets it to a default state. | |
| void | Save () |
| Saves the current system. | |
| void | SaveAs (string fileName) |
| Saves the current system to the specified file. All future calls to Save will use the same file. | |
| bool | Close (bool saveIfNeeded) |
| Closes the current system, saving if specified. Note that the IZOSAPI_Application.PrimarySystem cannot be closed. | |
| IOpticalSystem | CopySystem () |
| Creates a copy of this entire system, except for any related analysis windows. | |
| void | UpdateFileLists () |
| bool | ConvertToProjectDirectory (string folderPath) |
| bool | TurnOffProjectDirectory () |
| IMetadata | GetMetadata () |
Properties | |
| string | SystemName [get, set] |
| Gets or sets the name of the current system. | |
| int | SystemID [get] |
| Gets a unique identifier for the current system; this can be used to differentiate between multiple IOpticalSystem instances, and to identify the relevant system in a OpticalSystemStatusChangedHandler event. | |
| SystemType | Mode [get] |
| Gets the current sequential/non-sequential status. | |
| string | SystemFile [get] |
| Gets the full path and file name for the current system. | |
| bool | IsNonAxial [get] |
| Gets a value indicating whether the current system is an axial, sequential system. | |
| bool | NeedsSave [get] |
| ISystemData | SystemData [get] |
| Data for configuring everything in the System Explorer. | |
| ILensDataEditor | LDE [get] |
| Gets the lens data editor. | |
| INonSeqEditor | NCE [get] |
| Gets the non-sequential component editor. | |
| IToleranceDataEditor | TDE [get] |
| Gets the tolerance data editor. | |
| IMeritFunctionEditor | MFE [get] |
| Gets the merit function editor. | |
| IMultiConfigEditor | MCE [get] |
| Gets the multi-configuration editor. | |
| I_Analyses | Analyses [get] |
| Gets the analyses for the current system. | |
| IOpticalSystemTools | Tools [get] |
| Gets an interface used to run various tools on the optical system. | |
| IZOSAPI_Application | TheApplication [get] |
| Gets the IZOSAPI_Application that owns this system. | |
| LensUpdateMode | UpdateMode [get, set] |
| Gets or sets the update mode used by the API when the system is modified. Note that this is different than the update mode saved with the current ZMX file. The default value is LensUpdateMode.EditorsOnly. | |
| SessionModes | SessionMode [get, set] |
| ISTARSubsystem | STARSubsystem [get] |
| Gets the ISTARSubsystem to control/access some STAR settings and system-level data. | |
| bool | IsProjectDirectory [get] |
Detailed Description
Represent a complete optical system. A IOpticalSystem corresponds to a single .ZMX file. See IZOSAPI_Application for information on how to get or create a IOpticalSystem.
- Examples
- CSharpStandalone_01_new_file_and_quickfocus.cs, CSharpStandalone_02_NSC_ray_trace.cs, CSharpStandalone_03_open_file_and_optimise.cs, CSharpStandalone_04_pull_data_from_FFTMTF.cs, CSharpStandalone_05_Read_ZRD_File.cs, CSharpStandalone_06_nsc_phase.cs, CSharpStandalone_07_TiltDecenterAndMFOperand.cs, CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_12_Seq_SystemExplorer.cs, CSharpStandalone_14_Seq_Tolerance.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_18_SetMulticonfiguration.cs, CSharpStandalone_19_Surface_Properties.cs, CSharpStandalone_20_export_CAD_File.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_22_seq_spot_diagram.cs, CSharpStandalone_23_ray_fan_native_manual_comparison.cs, CSharpStandalone_24_nsc_detectors.cs, CSharpStandalone_25_source_spectrum_diffraction_grating.cs, CSharpStandalone_26_modify_opticstudio_preferences.cs, and CSharpUserOperand_16_SumAbsoluteThickness.cs.
Member Function Documentation
◆ Close()
| bool ZOSAPI.IOpticalSystem.Close | ( | bool | saveIfNeeded | ) |
Closes the current system, saving if specified. Note that the IZOSAPI_Application.PrimarySystem cannot be closed.
- Parameters
-
saveIfNeeded if set to truethe system will before closing (if NeedsSave istrue).
- Returns
trueif the system was closed; otherwise,false.
◆ ConvertToProjectDirectory()
| bool ZOSAPI.IOpticalSystem.ConvertToProjectDirectory | ( | string | folderPath | ) |
◆ CopySystem()
| IOpticalSystem ZOSAPI.IOpticalSystem.CopySystem | ( | ) |
Creates a copy of this entire system, except for any related analysis windows.
- Returns
- A new copy of this system.
◆ GetCurrentStatus()
| string ZOSAPI.IOpticalSystem.GetCurrentStatus | ( | ) |
Gets the last status of the optical system. If null or the length is 0, then the system has no errors.
- Returns
◆ GetMetadata()
| IMetadata ZOSAPI.IOpticalSystem.GetMetadata | ( | ) |
◆ LoadFile()
| bool ZOSAPI.IOpticalSystem.LoadFile | ( | string | LensFile, |
| bool | saveIfNeeded | ||
| ) |
Replaces the current system with data from the specified file.
Usage (see Example 14 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
LensFile The lens file. saveIfNeeded if set to truethe current system will be saved before loading the new one.
- Returns
- Examples
- CSharpStandalone_02_NSC_ray_trace.cs, CSharpStandalone_03_open_file_and_optimise.cs, CSharpStandalone_04_pull_data_from_FFTMTF.cs, CSharpStandalone_05_Read_ZRD_File.cs, CSharpStandalone_07_TiltDecenterAndMFOperand.cs, CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_14_Seq_Tolerance.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_18_SetMulticonfiguration.cs, CSharpStandalone_20_export_CAD_File.cs, CSharpStandalone_22_seq_spot_diagram.cs, and CSharpStandalone_23_ray_fan_native_manual_comparison.cs.
◆ MakeNonSequential()
| bool ZOSAPI.IOpticalSystem.MakeNonSequential | ( | ) |
Makes the system non-sequential if it is not already. Note that any sequential data will be lost.
Usage (see Example 17 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ MakeSequential()
| bool ZOSAPI.IOpticalSystem.MakeSequential | ( | ) |
Sets the current system to sequential mode if it is not already.
- Returns
◆ New()
| void ZOSAPI.IOpticalSystem.New | ( | bool | saveIfNeeded | ) |
Clears all data in the current system and resets it to a default state.
Usage (see Example 17 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
saveIfNeeded if set to truethe current system will be saved before it is cleared.
◆ Save()
| void ZOSAPI.IOpticalSystem.Save | ( | ) |
◆ SaveAs()
| void ZOSAPI.IOpticalSystem.SaveAs | ( | string | fileName | ) |
Saves the current system to the specified file. All future calls to Save will use the same file.
Usage (see Example 14 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
fileName Name of the file.
- Examples
- CSharpStandalone_01_new_file_and_quickfocus.cs, CSharpStandalone_03_open_file_and_optimise.cs, CSharpStandalone_06_nsc_phase.cs, CSharpStandalone_07_TiltDecenterAndMFOperand.cs, CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_12_Seq_SystemExplorer.cs, CSharpStandalone_14_Seq_Tolerance.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_18_SetMulticonfiguration.cs, CSharpStandalone_19_Surface_Properties.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_24_nsc_detectors.cs, and CSharpStandalone_25_source_spectrum_diffraction_grating.cs.
◆ TurnOffProjectDirectory()
| bool ZOSAPI.IOpticalSystem.TurnOffProjectDirectory | ( | ) |
◆ UpdateFileLists()
| void ZOSAPI.IOpticalSystem.UpdateFileLists | ( | ) |
◆ UpdateStatus()
| string ZOSAPI.IOpticalSystem.UpdateStatus | ( | ) |
Forces the an update of the system, and returns the current status.
- Returns
Property Documentation
◆ Analyses
|
get |
Gets the analyses for the current system.
The analyses interface.
- Examples
- CSharpStandalone_04_pull_data_from_FFTMTF.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_22_seq_spot_diagram.cs, CSharpStandalone_23_ray_fan_native_manual_comparison.cs, CSharpStandalone_24_nsc_detectors.cs, and CSharpStandalone_25_source_spectrum_diffraction_grating.cs.
◆ IsNonAxial
|
get |
Gets a value indicating whether the current system is an axial, sequential system.
true if this instance is non axial; otherwise, false.
◆ IsProjectDirectory
|
get |
◆ LDE
|
get |
Gets the lens data editor.
Usage (see Example 15 for a full sample)
C#
C++
Matlab
Python
The lens data editor.
- Examples
- CSharpStandalone_01_new_file_and_quickfocus.cs, CSharpStandalone_03_open_file_and_optimise.cs, CSharpStandalone_07_TiltDecenterAndMFOperand.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_12_Seq_SystemExplorer.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_19_Surface_Properties.cs, CSharpStandalone_22_seq_spot_diagram.cs, CSharpStandalone_23_ray_fan_native_manual_comparison.cs, and CSharpUserOperand_16_SumAbsoluteThickness.cs.
◆ MCE
|
get |
Gets the multi-configuration editor.
The multiple configuration editor
◆ MFE
|
get |
Gets the merit function editor.
Usage (see Example 03 for a full sample)
C#
C++
Matlab
Python
The merit function editor.
◆ Mode
|
get |
Gets the current sequential/non-sequential status.
The mode.
◆ NCE
|
get |
Gets the non-sequential component editor.
Usage (see Example 17 for a full sample)
C#
C++
Matlab
Python
The non-sequential component editor.
- Examples
- CSharpStandalone_02_NSC_ray_trace.cs, CSharpStandalone_05_Read_ZRD_File.cs, CSharpStandalone_06_nsc_phase.cs, CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_24_nsc_detectors.cs, and CSharpStandalone_25_source_spectrum_diffraction_grating.cs.
◆ NeedsSave
|
get |
◆ SessionMode
|
getset |
◆ STARSubsystem
|
get |
Gets the ISTARSubsystem to control/access some STAR settings and system-level data.
The ISTARSubsystem interface.
◆ SystemData
|
get |
Data for configuring everything in the System Explorer.
Usage (see Example 15 for a full sample)
C#
C++
Matlab
Python
The system data.
- Examples
- CSharpStandalone_01_new_file_and_quickfocus.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_12_Seq_SystemExplorer.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_19_Surface_Properties.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_22_seq_spot_diagram.cs, CSharpStandalone_23_ray_fan_native_manual_comparison.cs, and CSharpStandalone_24_nsc_detectors.cs.
◆ SystemFile
|
get |
Gets the full path and file name for the current system.
The system file.
◆ SystemID
|
get |
Gets a unique identifier for the current system; this can be used to differentiate between multiple IOpticalSystem instances, and to identify the relevant system in a OpticalSystemStatusChangedHandler event.
The system identifier.
◆ SystemName
|
getset |
Gets or sets the name of the current system.
The name of the system.
◆ TDE
|
get |
Gets the tolerance data editor.
The tolerance data editor.
- Examples
- CSharpStandalone_14_Seq_Tolerance.cs.
◆ TheApplication
|
get |
Gets the IZOSAPI_Application that owns this system.
The owning IZOSAPI_Application interface.
◆ Tools
|
get |
Gets an interface used to run various tools on the optical system.
The tools interface.
- Examples
- CSharpStandalone_01_new_file_and_quickfocus.cs, CSharpStandalone_02_NSC_ray_trace.cs, CSharpStandalone_03_open_file_and_optimise.cs, CSharpStandalone_05_Read_ZRD_File.cs, CSharpStandalone_06_nsc_phase.cs, CSharpStandalone_07_TiltDecenterAndMFOperand.cs, CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_11_Basic_Seq.cs, CSharpStandalone_14_Seq_Tolerance.cs, CSharpStandalone_15_Seq_Optimization.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_18_SetMulticonfiguration.cs, CSharpStandalone_20_export_CAD_File.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_22_seq_spot_diagram.cs, CSharpStandalone_23_ray_fan_native_manual_comparison.cs, CSharpStandalone_24_nsc_detectors.cs, and CSharpStandalone_25_source_spectrum_diffraction_grating.cs.
◆ UpdateMode
|
getset |
Gets or sets the update mode used by the API when the system is modified. Note that this is different than the update mode saved with the current ZMX file. The default value is LensUpdateMode.EditorsOnly.
The update mode.