    

 ## On this page

  

 

 # ZOSAPI.IOpticalSystem Interface Reference

 Last update: 17.07.2025 

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. [More...](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#details)

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

string [GetCurrentStatus](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ad37a51429b75c2563af4410b79ea81c6) () Gets the last status of the optical system. If `null` or the length is 0, then the system has no errors.   
 string [UpdateStatus](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a45a3e58bca5b818d7194f990564de76e) () Forces the an update of the system, and returns the current status.   
 bool [MakeSequential](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ad7840f11f13711646dae1e7b3b4900d5) () Sets the current system to sequential mode if it is not already.   
 bool [MakeNonSequential](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ad333f24403925f539e8deff2027e7269) () Makes the system non-sequential if it is not already. Note that any sequential data will be lost.   
 bool [LoadFile](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a6eb1455ac53555ae6f30032d85b63735) (string LensFile, bool saveIfNeeded) Replaces the current system with data from the specified file.   
 void [New](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a77b5517fb230d393cf7db82d8fee8a86) (bool saveIfNeeded) Clears all data in the current system and resets it to a default state.   
 void [Save](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a8e1c511cdf7f6048f1287532edd3aadd) () Saves the current system.   
 void [SaveAs](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a32d2f472d9a6d3277f3cda76afb6d85d) (string fileName) Saves the current system to the specified file. All future calls to Save will use the same file.   
 bool [Close](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ad77b618778855b255a449cb907bcf33a) (bool saveIfNeeded) Closes the current system, saving if specified. Note that the IZOSAPI\_Application.PrimarySystem cannot be closed.   
 [IOpticalSystem](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml) [CopySystem](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#af2c572ecedb3aac9ade590cedbe9be39) () Creates a copy of this entire system, except for any related analysis windows.   
 void [UpdateFileLists](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#af4d6abd8c98468b148019fa5f941cdef) () bool [ConvertToProjectDirectory](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a70958232a754a8e1d5f9b969b85b2f57) (string folderPath) bool [TurnOffProjectDirectory](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#afd287f36455d73860978fc1313f00a56) () [IMetadata](interface_z_o_s_a_p_i_1_1_common_1_1_i_metadata.xhtml) [GetMetadata](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a23af3e989e8d46c36d69083c0daf1b49) () ## <a id="properties" name="properties"></a>Properties

string [SystemName](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#af2a585d778849394d847f1d1a39bd108)` [get, set]` Gets or sets the name of the current system.   
 int [SystemID](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a0260933adda93c17081a180ea7437436)` [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](namespace_z_o_s_a_p_i.xhtml#a3c37540f7b61a272f4eb50e826d27daf) [Mode](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#aa5562ee1fce91d44157d504572ef858b)` [get]` Gets the current sequential/non-sequential status.   
 string [SystemFile](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#acb94e2796b6300187d8c7afc50cbbede)` [get]` Gets the full path and file name for the current system.   
 bool [IsNonAxial](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a8a5722cbc3b26569c1e4d04dc869ca71)` [get]` Gets a value indicating whether the current system is an axial, sequential system.   
 bool [NeedsSave](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a1865890fa099322220c1be55cf0ddfbc)` [get]` [ISystemData](interface_z_o_s_a_p_i_1_1_system_data_1_1_i_system_data.xhtml) [SystemData](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a4c4e9771e9ea51766885fdd6fb6627f5)` [get]` Data for configuring everything in the System Explorer.   
 [ILensDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_lens_data_editor.xhtml) [LDE](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a942995136e3c3cf875cc1fde38d33477)` [get]` Gets the lens data editor.   
 [INonSeqEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_non_seq_editor.xhtml) [NCE](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ab3cb797b606066a251c1aecd58e73f16)` [get]` Gets the non-sequential component editor.   
 [IToleranceDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_t_d_e_1_1_i_tolerance_data_editor.xhtml) [TDE](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a31577012730985e562da96019e8e1ad0)` [get]` Gets the tolerance data editor.   
 [IMeritFunctionEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_merit_function_editor.xhtml) [MFE](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#ac427705057fa09ec839220a094f3033f)` [get]` Gets the merit function editor.   
 [IMultiConfigEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_c_e_1_1_i_multi_config_editor.xhtml) [MCE](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#adf62f3b20bd2db8384caf4a2cece6bb4)` [get]` Gets the multi-configuration editor.   
 [I\_Analyses](interface_z_o_s_a_p_i_1_1_analysis_1_1_i___analyses.xhtml) [Analyses](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a830cf50c046528c752605eea3cf5e899)` [get]` Gets the analyses for the current system.   
 [IOpticalSystemTools](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml) [Tools](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#add3e3631eadf7955b7b341179ff1eff8)` [get]` Gets an interface used to run various tools on the optical system.   
 [IZOSAPI\_Application](interface_z_o_s_a_p_i_1_1_i_z_o_s_a_p_i___application.xhtml) [TheApplication](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a5195d03a7c81fb43a8e62dae69b347d5)` [get]` Gets the IZOSAPI\_Application that owns this system.   
 [LensUpdateMode](namespace_z_o_s_a_p_i.xhtml#a928284b47bbcad0717a234689558250a) [UpdateMode](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a8c38bb004d5886ae03e10c238f9322cb)` [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](namespace_z_o_s_a_p_i.xhtml#a0bbab31714d9ab6077ce3a689a286f42) [SessionMode](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a98c712c8d2d1858a815992f49046a51b)` [get, set]` [ISTARSubsystem](interface_z_o_s_a_p_i_1_1_i_s_t_a_r_subsystem.xhtml) [STARSubsystem](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a73f64fdd7bf63a143edd6de6389218f3)` [get]` Gets the ISTARSubsystem to control/access some STAR settings and system-level data.   
 bool [IsProjectDirectory](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml#a7663b6f0ebf16734615e8ded49f12a0c)` [get]` <a id="details" name="details"></a>## 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](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#_a6), [CSharpStandalone\_02\_NSC\_ray\_trace.cs](_c_sharp_standalone_02__n_s_c_ray_trace_8cs-example.xhtml#_a6), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#_a6), [CSharpStandalone\_04\_pull\_data\_from\_FFTMTF.cs](_c_sharp_standalone_04_pull_data_from__f_f_t_m_t_f_8cs-example.xhtml#_a6), [CSharpStandalone\_05\_Read\_ZRD\_File.cs](_c_sharp_standalone_05__read__z_r_d__file_8cs-example.xhtml#_a6), [CSharpStandalone\_06\_nsc\_phase.cs](_c_sharp_standalone_06_nsc_phase_8cs-example.xhtml#_a6), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#_a6), [CSharpStandalone\_08\_NSCEDetectorData.cs](_c_sharp_standalone_08__n_s_c_e_detector_data_8cs-example.xhtml#_a6), [CSharpStandalone\_09\_NSC\_CAD.cs](_c_sharp_standalone_09__n_s_c__c_a_d_8cs-example.xhtml#_a6), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#_a6), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#_a7), [CSharpStandalone\_12\_Seq\_SystemExplorer.cs](_c_sharp_standalone_12__seq__system_explorer_8cs-example.xhtml#_a6), [CSharpStandalone\_14\_Seq\_Tolerance.cs](_c_sharp_standalone_14__seq__tolerance_8cs-example.xhtml#_a6), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#_a6), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#_a6), [CSharpStandalone\_18\_SetMulticonfiguration.cs](_c_sharp_standalone_18__set_multiconfiguration_8cs-example.xhtml#_a6), [CSharpStandalone\_19\_Surface\_Properties.cs](_c_sharp_standalone_19__surface__properties_8cs-example.xhtml#_a6), [CSharpStandalone\_20\_export\_CAD\_File.cs](_c_sharp_standalone_20_export__c_a_d__file_8cs-example.xhtml#_a6), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#_a6), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#_a6), [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#_a6), [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#_a6), [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#_a6), [CSharpStandalone\_26\_modify\_opticstudio\_preferences.cs](_c_sharp_standalone_26_modify_opticstudio_preferences_8cs-example.xhtml#_a7), and [CSharpUserOperand\_16\_SumAbsoluteThickness.cs](_c_sharp_user_operand_16__sum_absolute_thickness_8cs-example.xhtml#_a11).

## Member Function Documentation

<a id="ad77b618778855b255a449cb907bcf33a" name="ad77b618778855b255a449cb907bcf33a"></a>## [◆ ](#ad77b618778855b255a449cb907bcf33a)Close()

 bool ZOSAPI.IOpticalSystem.Close  ( bool  *saveIfNeeded*) 

Closes the current system, saving if specified. Note that the IZOSAPI\_Application.PrimarySystem cannot be closed.

Parameters saveIfNeededif set to `true` the system will before closing (if NeedsSave is `true`).Returns`true` if the system was closed; otherwise, `false`.



<a id="a70958232a754a8e1d5f9b969b85b2f57" name="a70958232a754a8e1d5f9b969b85b2f57"></a>## [◆ ](#a70958232a754a8e1d5f9b969b85b2f57)ConvertToProjectDirectory()

 bool ZOSAPI.IOpticalSystem.ConvertToProjectDirectory  ( string  *folderPath*) 





<a id="af2c572ecedb3aac9ade590cedbe9be39" name="af2c572ecedb3aac9ade590cedbe9be39"></a>## [◆ ](#af2c572ecedb3aac9ade590cedbe9be39)CopySystem()

 [IOpticalSystem](interface_z_o_s_a_p_i_1_1_i_optical_system.xhtml) ZOSAPI.IOpticalSystem.CopySystem  ( ) 

Creates a copy of this entire system, except for any related analysis windows.

ReturnsA new copy of this system.



<a id="ad37a51429b75c2563af4410b79ea81c6" name="ad37a51429b75c2563af4410b79ea81c6"></a>## [◆ ](#ad37a51429b75c2563af4410b79ea81c6)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



<a id="a23af3e989e8d46c36d69083c0daf1b49" name="a23af3e989e8d46c36d69083c0daf1b49"></a>## [◆ ](#a23af3e989e8d46c36d69083c0daf1b49)GetMetadata()

 [IMetadata](interface_z_o_s_a_p_i_1_1_common_1_1_i_metadata.xhtml) ZOSAPI.IOpticalSystem.GetMetadata  ( ) 





<a id="a6eb1455ac53555ae6f30032d85b63735" name="a6eb1455ac53555ae6f30032d85b63735"></a>## [◆ ](#a6eb1455ac53555ae6f30032d85b63735)LoadFile()

 bool ZOSAPI.IOpticalSystem.LoadFile  ( string  *LensFile*,    bool  *saveIfNeeded*   ) 

Replaces the current system with data from the specified file.

Usage (see [Example 14](page_ex14.xhtml) for a full sample)

C#

 // Open Double Gauss sample file

 string samplesFolder = TheApplication.SamplesDir;

 string DGfile = System.IO.Path.Combine(samplesFolder, "Sequential\\\\Objectives\\\\Double Gauss 28 degree field.zos");

 TheSystem.LoadFile(DGfile, false);



 C++

 // Open Double Gauss sample file

 _bstr_t samplesFolder = TheApplication-&gt;SamplesDir;

 _bstr_t DGfile = samplesFolder + (_bstr_t)"\\\\Sequential\\\\Objectives\\\\Double Gauss 28 degree field.zos";

 TheSystem-&gt;LoadFile(DGfile, false);



 Matlab

 % Open Double Gauss sample file

 samplesFolder = TheApplication.SamplesDir;

 DGfile = System.String.Concat(samplesFolder, '\\Sequential\\Objectives\\Double Gauss 28 degree field.zos');

 TheSystem.LoadFile(DGfile, false);



 Python

 \# Open Double Gauss sample file

 samplesFolder = TheApplication.SamplesDir

 DGfile = samplesFolder + r"\\Sequential\\Objectives\\Double Gauss 28 degree field.zos"

 TheSystem.LoadFile(DGfile, False)



 Parameters LensFileThe lens file.saveIfNeededif set to `true` the current system will be saved before loading the new one.ReturnsExamples[CSharpStandalone\_02\_NSC\_ray\_trace.cs](_c_sharp_standalone_02__n_s_c_ray_trace_8cs-example.xhtml#a9), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a9), [CSharpStandalone\_04\_pull\_data\_from\_FFTMTF.cs](_c_sharp_standalone_04_pull_data_from__f_f_t_m_t_f_8cs-example.xhtml#a9), [CSharpStandalone\_05\_Read\_ZRD\_File.cs](_c_sharp_standalone_05__read__z_r_d__file_8cs-example.xhtml#a8), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#a8), [CSharpStandalone\_08\_NSCEDetectorData.cs](_c_sharp_standalone_08__n_s_c_e_detector_data_8cs-example.xhtml#a9), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a9), [CSharpStandalone\_14\_Seq\_Tolerance.cs](_c_sharp_standalone_14__seq__tolerance_8cs-example.xhtml#a9), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a9), [CSharpStandalone\_18\_SetMulticonfiguration.cs](_c_sharp_standalone_18__set_multiconfiguration_8cs-example.xhtml#a9), [CSharpStandalone\_20\_export\_CAD\_File.cs](_c_sharp_standalone_20_export__c_a_d__file_8cs-example.xhtml#a8), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#a9), and [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a9).



<a id="ad333f24403925f539e8deff2027e7269" name="ad333f24403925f539e8deff2027e7269"></a>## [◆ ](#ad333f24403925f539e8deff2027e7269)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](page_ex17.xhtml) for a full sample)

C#

 //Create a New File

 TheSystem.New(false);

 TheSystem.MakeNonSequential();



 C++

 //Create a New File

 TheSystem-&gt;New(false);

 TheSystem-&gt;MakeNonSequential();



 Matlab

 % Create New File

 TheSystem.New(false);

 TheSystem.MakeNonSequential();



 Python

 \# Create New File

 TheSystem.New(False)

 TheSystem.MakeNonSequential()



 ReturnsExamples[CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a10), and [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a10).



<a id="ad7840f11f13711646dae1e7b3b4900d5" name="ad7840f11f13711646dae1e7b3b4900d5"></a>## [◆ ](#ad7840f11f13711646dae1e7b3b4900d5)MakeSequential()

 bool ZOSAPI.IOpticalSystem.MakeSequential  ( ) 

Sets the current system to sequential mode if it is not already.

Returns



<a id="a77b5517fb230d393cf7db82d8fee8a86" name="a77b5517fb230d393cf7db82d8fee8a86"></a>## [◆ ](#a77b5517fb230d393cf7db82d8fee8a86)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](page_ex17.xhtml) for a full sample)

C#

 //Create a New File

 TheSystem.New(false);

 TheSystem.MakeNonSequential();



 C++

 //Create a New File

 TheSystem-&gt;New(false);

 TheSystem-&gt;MakeNonSequential();



 Matlab

 % Create New File

 TheSystem.New(false);

 TheSystem.MakeNonSequential();



 Python

 \# Create New File

 TheSystem.New(False)

 TheSystem.MakeNonSequential()



 Parameters saveIfNeededif set to `true` the current system will be saved before it is cleared.Examples[CSharpStandalone\_01\_new\_file\_and\_quickfocus.cs](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a9), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a10), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a9), [CSharpStandalone\_19\_Surface\_Properties.cs](_c_sharp_standalone_19__surface__properties_8cs-example.xhtml#a9), and [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a9).



<a id="a8e1c511cdf7f6048f1287532edd3aadd" name="a8e1c511cdf7f6048f1287532edd3aadd"></a>## [◆ ](#a8e1c511cdf7f6048f1287532edd3aadd)Save()

 void ZOSAPI.IOpticalSystem.Save  ( ) 

Saves the current system.

Examples[CSharpStandalone\_01\_new\_file\_and\_quickfocus.cs](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a32), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a35), [CSharpStandalone\_09\_NSC\_CAD.cs](_c_sharp_standalone_09__n_s_c__c_a_d_8cs-example.xhtml#a19), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a29), and [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a42).



<a id="a32d2f472d9a6d3277f3cda76afb6d85d" name="a32d2f472d9a6d3277f3cda76afb6d85d"></a>## [◆ ](#a32d2f472d9a6d3277f3cda76afb6d85d)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](page_ex14.xhtml) for a full sample)

C#

 // Create a "Double Gauss" folder in the Samples folder

 string dirLoc = System.IO.Path.Combine(samplesFolder, "API\\\\CS\\\\e14\_seq\_tolerance");

 System.IO.Directory.CreateDirectory(dirLoc);

 // Save a copy of the file in the Double Gauss folder

 string fileNameSeq = System.IO.Path.Combine(dirLoc, "Double Gauss (seq).zos");

 TheSystem.SaveAs(fileNameSeq);



 C++

 // Create a "Double Gauss" folder in the Samples folder

 _bstr_t dirLoc = samplesFolder + (_bstr_t)"\\\\API\\\\CPP\\\\e14\_seq\_tolerance";

 CreateDirectory(dirLoc, NULL);

 // Save a copy of the file in the Double Gauss folder

 _bstr_t fileNameSeq = dirLoc + (_bstr_t)"\\\\Double\_Gauss\_(seq).zos";

 TheSystem-&gt;SaveAs(fileNameSeq);



 Matlab

 % Create a "Double Gauss" folder in the Samples folder

 dirLoc = System.String.Concat(samplesFolder, '\\API\\Matlab\\e14\_seq\_tolerance');

 if (exist(char(dirLoc)) == 0) mkdir(char(dirLoc)); end;

 % Save a copy of the file in the Double Gauss folder

 fileNameSeq = System.String.Concat(dirLoc, '\\Double Gauss (seq).zos');

 TheSystem.SaveAs(fileNameSeq);



 Python

 \# Create a "Double Gauss" folder in the Samples folder

 import os

 dirLoc = samplesFolder + "\\\\API\\\\Python\\\\e14\_seq\_tolerance"

 if not os.path.exists(dirLoc):

 os.makedirs(dirLoc)

 \# Save new file to Double Gauss folder

 fileNameSeq = dirLoc + "\\\\Double Gauss (seq).zos"

 TheSystem.SaveAs(fileNameSeq)



 Parameters fileNameName of the file.Examples[CSharpStandalone\_01\_new\_file\_and\_quickfocus.cs](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a10), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a10), [CSharpStandalone\_06\_nsc\_phase.cs](_c_sharp_standalone_06_nsc_phase_8cs-example.xhtml#a26), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#a22), [CSharpStandalone\_08\_NSCEDetectorData.cs](_c_sharp_standalone_08__n_s_c_e_detector_data_8cs-example.xhtml#a20), [CSharpStandalone\_09\_NSC\_CAD.cs](_c_sharp_standalone_09__n_s_c__c_a_d_8cs-example.xhtml#a10), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a10), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a11), [CSharpStandalone\_12\_Seq\_SystemExplorer.cs](_c_sharp_standalone_12__seq__system_explorer_8cs-example.xhtml#a28), [CSharpStandalone\_14\_Seq\_Tolerance.cs](_c_sharp_standalone_14__seq__tolerance_8cs-example.xhtml#a13), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a10), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a12), [CSharpStandalone\_18\_SetMulticonfiguration.cs](_c_sharp_standalone_18__set_multiconfiguration_8cs-example.xhtml#a23), [CSharpStandalone\_19\_Surface\_Properties.cs](_c_sharp_standalone_19__surface__properties_8cs-example.xhtml#a38), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a51), [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#a52), and [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#a46).



<a id="afd287f36455d73860978fc1313f00a56" name="afd287f36455d73860978fc1313f00a56"></a>## [◆ ](#afd287f36455d73860978fc1313f00a56)TurnOffProjectDirectory()

 bool ZOSAPI.IOpticalSystem.TurnOffProjectDirectory  ( ) 





<a id="af4d6abd8c98468b148019fa5f941cdef" name="af4d6abd8c98468b148019fa5f941cdef"></a>## [◆ ](#af4d6abd8c98468b148019fa5f941cdef)UpdateFileLists()

 void ZOSAPI.IOpticalSystem.UpdateFileLists  ( ) 





<a id="a45a3e58bca5b818d7194f990564de76e" name="a45a3e58bca5b818d7194f990564de76e"></a>## [◆ ](#a45a3e58bca5b818d7194f990564de76e)UpdateStatus()

 string ZOSAPI.IOpticalSystem.UpdateStatus  ( ) 

Forces the an update of the system, and returns the current status.

Returns



## Property Documentation

<a id="a830cf50c046528c752605eea3cf5e899" name="a830cf50c046528c752605eea3cf5e899"></a>## [◆ ](#a830cf50c046528c752605eea3cf5e899)Analyses

 [I\_Analyses](interface_z_o_s_a_p_i_1_1_analysis_1_1_i___analyses.xhtml) ZOSAPI.IOpticalSystem.Analyses  get 

Gets the analyses for the current system.

The analyses interface.

Examples[CSharpStandalone\_04\_pull\_data\_from\_FFTMTF.cs](_c_sharp_standalone_04_pull_data_from__f_f_t_m_t_f_8cs-example.xhtml#a11), [CSharpStandalone\_09\_NSC\_CAD.cs](_c_sharp_standalone_09__n_s_c__c_a_d_8cs-example.xhtml#a26), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a17), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a32), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a22), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a29), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a45), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#a22), [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a23), [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#a39), and [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#a37).



<a id="a8a5722cbc3b26569c1e4d04dc869ca71" name="a8a5722cbc3b26569c1e4d04dc869ca71"></a>## [◆ ](#a8a5722cbc3b26569c1e4d04dc869ca71)IsNonAxial

 bool ZOSAPI.IOpticalSystem.IsNonAxial  get 

Gets a value indicating whether the current system is an axial, sequential system.

`true` if this instance is non axial; otherwise, `false`.





<a id="a7663b6f0ebf16734615e8ded49f12a0c" name="a7663b6f0ebf16734615e8ded49f12a0c"></a>## [◆ ](#a7663b6f0ebf16734615e8ded49f12a0c)IsProjectDirectory

 bool ZOSAPI.IOpticalSystem.IsProjectDirectory  get 





<a id="a942995136e3c3cf875cc1fde38d33477" name="a942995136e3c3cf875cc1fde38d33477"></a>## [◆ ](#a942995136e3c3cf875cc1fde38d33477)LDE

 [ILensDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_lens_data_editor.xhtml) ZOSAPI.IOpticalSystem.LDE  get 

Gets the lens data editor.

Usage (see [Example 15](page_ex15.xhtml) for a full sample)

C#

 // remove all variables and add a F# solve on last surface radius

 [ILensDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_lens_data_editor.xhtml) TheLDE = TheSystem.LDE;

 [IOpticalSystemTools](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml) tools = TheSystem.Tools;

 tools.[RemoveAllVariables](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml#a74ba97071e2838cebea60050bc5353a2)();

 [ILDERow](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_l_d_e_row.xhtml) Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);

 [ISolveData](interface_z_o_s_a_p_i_1_1_editors_1_1_i_solve_data.xhtml) Solver = Surface_Last.RadiusCell.CreateSolveType([ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).SolveType.FNumber);

 Solver._S_FNumber.FNumber = 3.1415;

 Surface_Last.RadiusCell.SetSolveData(Solver);

 SampleFile = System.IO.Path.Combine(TheApplication.SamplesDir, @"API\\CS\\e15\_Seq\_Optimization\\OptimizedFile1.zos");

 TheSystem.SaveAs(SampleFile);

[ZOSAPI.Editors.ISolveData](interface_z_o_s_a_p_i_1_1_editors_1_1_i_solve_data.xhtml)

Base interface for all solve types. This interface can be accesed via the IEditorCell interface....

**Definition:** InterfacesEditors.cs:563



[ZOSAPI.Editors.LDE.ILDERow](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_l_d_e_row.xhtml)

All data for a Lens Data Editor surface. This interface can be accessed via the ILensDataEditor inter...

**Definition:** InterfacesLDE.cs:791



[ZOSAPI.Editors.LDE.ILensDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_l_d_e_1_1_i_lens_data_editor.xhtml)

This interface defines all properties and methods needed to interact with the Lens Data Editor....

**Definition:** InterfacesLDE.cs:265



[ZOSAPI.Tools.IOpticalSystemTools](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml)

Methods to run various system-wide tools. This interface can be accessed via the IOpticalSystem inter...

**Definition:** Tools.cs:107



[ZOSAPI.Tools.IOpticalSystemTools.RemoveAllVariables](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml#a74ba97071e2838cebea60050bc5353a2)

bool RemoveAllVariables()

Removes all variables in the system.



[ZOSAPI.Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml)

**Definition:** InterfacesEditors.cs:12



[ZOSAPI](namespace_z_o_s_a_p_i.xhtml)

The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...

**Definition:** IAS_FieldCurvatureAndDistortion.cs:5





 C++

 // remove all variables and add a F# solve on last surface radius

 ILensDataEditorPtr TheLDE = TheSystem-&gt;LDE;

 //IOpticalSystemTools

 IOpticalSystemToolsPtr tools = TheSystem-&gt;Tools;

 tools-&gt;RemoveAllVariables();

 ILDERowPtr Surface_Last = TheLDE-&gt;GetSurfaceAt(TheLDE-&gt;NumberOfSurfaces - 2);

 ISolveDataPtr Solver = Surface_Last-&gt;RadiusCell-&gt;CreateSolveType(SolveType::SolveType_FNumber);

 Solver-&gt;_S_FNumber-&gt;FNumber = 3.1415;

 Surface_Last-&gt;RadiusCell-&gt;SetSolveData(Solver);

 SampleFile = _bstr_t(TheApplication-&gt;SamplesDir) + "\\\\API\\\\\\Seq\_Optimization\\\\\\OptimizedFile1.zos";

 TheSystem-&gt;SaveAs(SampleFile);



 Matlab

 % remove all variables and add a F# solve on last surface radius

 TheLDE = TheSystem.LDE;

 tools = TheSystem.Tools;

 tools.RemoveAllVariables();

 Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);

 Solver = Surface_Last.RadiusCell.CreateSolveType([ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).SolveType.FNumber);

 Solver.S_FNumber_.FNumber = 3.1415;

 Surface_Last.RadiusCell.SetSolveData(Solver);

 SampleFile = System.String.Concat(TheApplication.SamplesDir, '\\API\\Matlab\\e15\_Seq\_Optimization\\OptimizedFile1.zos');

 TheSystem.SaveAs(SampleFile);



 Python

 \# remove all variables and add a F# solve on last surface radius

 TheLDE = TheSystem.LDE

 \#IOpticalSystemTools

 tools = TheSystem.Tools

 tools.RemoveAllVariables()

 Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2)

 Solver = Surface_Last.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber)

 Solver._S_FNumber.FNumber = 3.1415

 Surface_Last.RadiusCell.SetSolveData(Solver)

 SampleFile = TheApplication.SamplesDir + '\\\\API\\\\Python\\\\e15\_Seq\_Optimization\\\\OptimizedFile1.zos'

 TheSystem.SaveAs(SampleFile)



The lens data editor.

Examples[CSharpStandalone\_01\_new\_file\_and\_quickfocus.cs](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a20), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a12), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#a14), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a17), [CSharpStandalone\_12\_Seq\_SystemExplorer.cs](_c_sharp_standalone_12__seq__system_explorer_8cs-example.xhtml#a17), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a32), [CSharpStandalone\_19\_Surface\_Properties.cs](_c_sharp_standalone_19__surface__properties_8cs-example.xhtml#a16), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#a12), [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a13), and [CSharpUserOperand\_16\_SumAbsoluteThickness.cs](_c_sharp_user_operand_16__sum_absolute_thickness_8cs-example.xhtml#a14).



<a id="adf62f3b20bd2db8384caf4a2cece6bb4" name="adf62f3b20bd2db8384caf4a2cece6bb4"></a>## [◆ ](#adf62f3b20bd2db8384caf4a2cece6bb4)MCE

 [IMultiConfigEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_c_e_1_1_i_multi_config_editor.xhtml) ZOSAPI.IOpticalSystem.MCE  get 

Gets the multi-configuration editor.

The multiple configuration editor

Examples[CSharpStandalone\_18\_SetMulticonfiguration.cs](_c_sharp_standalone_18__set_multiconfiguration_8cs-example.xhtml#a11), and [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#a20).



<a id="ac427705057fa09ec839220a094f3033f" name="ac427705057fa09ec839220a094f3033f"></a>## [◆ ](#ac427705057fa09ec839220a094f3033f)MFE

 [IMeritFunctionEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_merit_function_editor.xhtml) ZOSAPI.IOpticalSystem.MFE  get 

Gets the merit function editor.

Usage (see [Example 03](page_ex03.xhtml) for a full sample)

C#

 // Merit functions

 [IMeritFunctionEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_merit_function_editor.xhtml) TheMFE = TheSystem.MFE;

 [IMFERow](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_m_f_e_row.xhtml) Operand_1 = TheMFE.GetOperandAt(1);

 Operand_1.[ChangeType](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_m_f_e_row.xhtml#aa3ad3be8f26d5617b7b964d0f999d563)([MeritOperandType](namespace_z_o_s_a_p_i_1_1_editors_1_1_m_f_e.xhtml#aa186922480921b908b329f1655025fe4).ASTI);

 Operand_1.Target = 0.0;

 Operand_1.Weight = 10.0;

[ZOSAPI.Editors.MFE.IMFERow](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_m_f_e_row.xhtml)

All data for a Merit Function Editor operand. This interface can be accessed via the IMeritFunctionEd...

**Definition:** InterfacesMFE.cs:697



[ZOSAPI.Editors.MFE.IMFERow.ChangeType](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_m_f_e_row.xhtml#aa3ad3be8f26d5617b7b964d0f999d563)

bool ChangeType(MeritOperandType type)

Changes to the specified operand type.



[ZOSAPI.Editors.MFE.IMeritFunctionEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_m_f_e_1_1_i_merit_function_editor.xhtml)

This interface defines all properties and methods needed to interact with the MRit Function Editor....

**Definition:** InterfacesMFE.cs:492



[ZOSAPI.Editors.MFE.MeritOperandType](namespace_z_o_s_a_p_i_1_1_editors_1_1_m_f_e.xhtml#aa186922480921b908b329f1655025fe4)

MeritOperandType

All supported Merit Function operands.

**Definition:** InterfacesMFE.cs:19





 C++

 // Merit functions

 IMeritFunctionEditorPtr TheMFE = TheSystem-&gt;MFE;

 IMFERowPtr Operand_1 = TheMFE-&gt;GetOperandAt(1);

 Operand_1-&gt;ChangeType(MeritOperandType_ASTI);

 Operand_1-&gt;Target = 0.0;

 Operand_1-&gt;Weight = 10.0;



 Matlab

 % Merit functions

 TheMFE = TheSystem.MFE;

 Operand_1 = TheMFE.GetOperandAt(1);

 Operand_1.ChangeType([ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).[MFE](namespace_z_o_s_a_p_i_1_1_editors_1_1_m_f_e.xhtml).MeritOperandType.ASTI);

 Operand_1.Target = 0.0;

 Operand_1.Weight = 10.0;

[ZOSAPI.Editors.MFE](namespace_z_o_s_a_p_i_1_1_editors_1_1_m_f_e.xhtml)

**Definition:** InterfacesMFE.cs:12





 Python

 \# Merit functions

 TheMFE = TheSystem.MFE

 Operand_1 = TheMFE.GetOperandAt(1)

 Operand_1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.ASTI)

 Operand_1.Target = 0.0

 Operand_1.Weight = 10.0



The merit function editor.

Examples[CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a19), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#a21), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a53), and [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a16).



<a id="aa5562ee1fce91d44157d504572ef858b" name="aa5562ee1fce91d44157d504572ef858b"></a>## [◆ ](#aa5562ee1fce91d44157d504572ef858b)Mode

 [SystemType](namespace_z_o_s_a_p_i.xhtml#a3c37540f7b61a272f4eb50e826d27daf) ZOSAPI.IOpticalSystem.Mode  get 

Gets the current sequential/non-sequential status.

The mode.





<a id="ab3cb797b606066a251c1aecd58e73f16" name="ab3cb797b606066a251c1aecd58e73f16"></a>## [◆ ](#ab3cb797b606066a251c1aecd58e73f16)NCE

 [INonSeqEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_non_seq_editor.xhtml) ZOSAPI.IOpticalSystem.NCE  get 

Gets the non-sequential component editor.

Usage (see [Example 17](page_ex17.xhtml) for a full sample)

C#

 //Non-sequential component editor

 [INonSeqEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_non_seq_editor.xhtml) TheNCE = TheSystem.NCE;

 TheNCE = TheSystem.NCE;

 [INCERow](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_n_c_e_row.xhtml) Object_1 = TheNCE.InsertNewObjectAt(1);

 [INCERow](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_n_c_e_row.xhtml) Object_2 = TheNCE.InsertNewObjectAt(2);

 [INCERow](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_n_c_e_row.xhtml) Object_3 = TheNCE.GetObjectAt(3);

[ZOSAPI.Editors.NCE.INCERow](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_n_c_e_row.xhtml)

All data for a Non-Sequential Component Editor object. This interface can be accessed via the INonSeq...

**Definition:** InterfacesNCE.cs:1198



[ZOSAPI.Editors.NCE.INonSeqEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_n_c_e_1_1_i_non_seq_editor.xhtml)

This interface defines all properties and methods needed to interact with the Non-Sequential Componen...

**Definition:** InterfacesNCE.cs:363





 C++

 //Non-sequential component editor

 INonSeqEditorPtr TheNCE = TheSystem-&gt;NCE;

 TheNCE = TheSystem-&gt;NCE;

 INCERowPtr Object_1 = TheNCE-&gt;InsertNewObjectAt(1);

 INCERowPtr Object_2 = TheNCE-&gt;InsertNewObjectAt(2);

 INCERowPtr Object_3 = TheNCE-&gt;GetObjectAt(3);



 Matlab

 % Non-sequential component editor

 TheNCE = TheSystem.NCE;

 Object_1 = TheNCE.InsertNewObjectAt(1);

 Object_2 = TheNCE.InsertNewObjectAt(2);

 Object_3 = TheNCE.GetObjectAt(3);



 Python

 \# Non-sequential component editor

 TheNCE = TheSystem.NCE

 Object_1 = TheNCE.InsertNewObjectAt(1)

 Object_2 = TheNCE.InsertNewObjectAt(2)

 Object_3 = TheNCE.GetObjectAt(3)



The non-sequential component editor.

Examples[CSharpStandalone\_02\_NSC\_ray\_trace.cs](_c_sharp_standalone_02__n_s_c_ray_trace_8cs-example.xhtml#a15), [CSharpStandalone\_05\_Read\_ZRD\_File.cs](_c_sharp_standalone_05__read__z_r_d__file_8cs-example.xhtml#a9), [CSharpStandalone\_06\_nsc\_phase.cs](_c_sharp_standalone_06_nsc_phase_8cs-example.xhtml#a25), [CSharpStandalone\_08\_NSCEDetectorData.cs](_c_sharp_standalone_08__n_s_c_e_detector_data_8cs-example.xhtml#a11), [CSharpStandalone\_09\_NSC\_CAD.cs](_c_sharp_standalone_09__n_s_c__c_a_d_8cs-example.xhtml#a12), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a22), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a14), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a13), [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#a12), and [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#a11).



<a id="a1865890fa099322220c1be55cf0ddfbc" name="a1865890fa099322220c1be55cf0ddfbc"></a>## [◆ ](#a1865890fa099322220c1be55cf0ddfbc)NeedsSave

 bool ZOSAPI.IOpticalSystem.NeedsSave  get 





<a id="a98c712c8d2d1858a815992f49046a51b" name="a98c712c8d2d1858a815992f49046a51b"></a>## [◆ ](#a98c712c8d2d1858a815992f49046a51b)SessionMode

 [SessionModes](namespace_z_o_s_a_p_i.xhtml#a0bbab31714d9ab6077ce3a689a286f42) ZOSAPI.IOpticalSystem.SessionMode  getset 





<a id="a73f64fdd7bf63a143edd6de6389218f3" name="a73f64fdd7bf63a143edd6de6389218f3"></a>## [◆ ](#a73f64fdd7bf63a143edd6de6389218f3)STARSubsystem

 [ISTARSubsystem](interface_z_o_s_a_p_i_1_1_i_s_t_a_r_subsystem.xhtml) ZOSAPI.IOpticalSystem.STARSubsystem  get 

Gets the ISTARSubsystem to control/access some STAR settings and system-level data.

The ISTARSubsystem interface.





<a id="a4c4e9771e9ea51766885fdd6fb6627f5" name="a4c4e9771e9ea51766885fdd6fb6627f5"></a>## [◆ ](#a4c4e9771e9ea51766885fdd6fb6627f5)SystemData

 [ISystemData](interface_z_o_s_a_p_i_1_1_system_data_1_1_i_system_data.xhtml) ZOSAPI.IOpticalSystem.SystemData  get 

Data for configuring everything in the System Explorer.

Usage (see [Example 15](page_ex15.xhtml) for a full sample)

C#

 //Define System Explorer

 //Define Aperture

 [ISystemData](interface_z_o_s_a_p_i_1_1_system_data_1_1_i_system_data.xhtml) SystExplorer = TheSystem.SystemData;

 SystExplorer.Aperture.ApertureType = [ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[SystemData](namespace_z_o_s_a_p_i_1_1_system_data.xhtml).ZemaxApertureType.EntrancePupilDiameter;

 SystExplorer.Aperture.ApertureValue = 20;

[ZOSAPI.SystemData.ISystemData](interface_z_o_s_a_p_i_1_1_system_data_1_1_i_system_data.xhtml)

Interfaces and methods for changing all System Explorer data. This interface can be accessed via the ...

**Definition:** InterfacesSE.cs:275



[ZOSAPI.SystemData](namespace_z_o_s_a_p_i_1_1_system_data.xhtml)

**Definition:** InterfacesSE.cs:11





 C++

 // Define System Explorer

 // Define Aperture

 ISystemDataPtr SystExplorer = TheSystem-&gt;SystemData;

 SystExplorer-&gt;Aperture-&gt;ApertureType = ZemaxApertureType::ZemaxApertureType_EntrancePupilDiameter;

 SystExplorer-&gt;Aperture-&gt;ApertureValue = 20;



 Matlab

 %Define System Explorer

 %Define Aperture

 SystExplorer = TheSystem.SystemData;

 SystExplorer.Aperture.ApertureType = [ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[SystemData](namespace_z_o_s_a_p_i_1_1_system_data.xhtml).ZemaxApertureType.EntrancePupilDiameter;

 SystExplorer.Aperture.ApertureValue = 20;



 Python

 \# Define System Explorer

 \# Define Aperture

 SystExplorer = TheSystem.SystemData

 SystExplorer.Aperture.ApertureType = ZOSAPI.SystemData.ZemaxApertureType.EntrancePupilDiameter

 SystExplorer.Aperture.ApertureValue = 20



The system data.

Examples[CSharpStandalone\_01\_new\_file\_and\_quickfocus.cs](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a11), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a13), [CSharpStandalone\_12\_Seq\_SystemExplorer.cs](_c_sharp_standalone_12__seq__system_explorer_8cs-example.xhtml#a10), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a12), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a11), [CSharpStandalone\_19\_Surface\_Properties.cs](_c_sharp_standalone_19__surface__properties_8cs-example.xhtml#a11), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a11), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#a15), [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a10), and [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#a10).



<a id="acb94e2796b6300187d8c7afc50cbbede" name="acb94e2796b6300187d8c7afc50cbbede"></a>## [◆ ](#acb94e2796b6300187d8c7afc50cbbede)SystemFile

 string ZOSAPI.IOpticalSystem.SystemFile  get 

Gets the full path and file name for the current system.

The system file.





<a id="a0260933adda93c17081a180ea7437436" name="a0260933adda93c17081a180ea7437436"></a>## [◆ ](#a0260933adda93c17081a180ea7437436)SystemID

 int ZOSAPI.IOpticalSystem.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.





<a id="af2a585d778849394d847f1d1a39bd108" name="af2a585d778849394d847f1d1a39bd108"></a>## [◆ ](#af2a585d778849394d847f1d1a39bd108)SystemName

 string ZOSAPI.IOpticalSystem.SystemName  getset 

Gets or sets the name of the current system.

The name of the system.





<a id="a31577012730985e562da96019e8e1ad0" name="a31577012730985e562da96019e8e1ad0"></a>## [◆ ](#a31577012730985e562da96019e8e1ad0)TDE

 [IToleranceDataEditor](interface_z_o_s_a_p_i_1_1_editors_1_1_t_d_e_1_1_i_tolerance_data_editor.xhtml) ZOSAPI.IOpticalSystem.TDE  get 

Gets the tolerance data editor.

The tolerance data editor.

Examples[CSharpStandalone\_14\_Seq\_Tolerance.cs](_c_sharp_standalone_14__seq__tolerance_8cs-example.xhtml#a11).



<a id="a5195d03a7c81fb43a8e62dae69b347d5" name="a5195d03a7c81fb43a8e62dae69b347d5"></a>## [◆ ](#a5195d03a7c81fb43a8e62dae69b347d5)TheApplication

 [IZOSAPI\_Application](interface_z_o_s_a_p_i_1_1_i_z_o_s_a_p_i___application.xhtml) ZOSAPI.IOpticalSystem.TheApplication  get 

Gets the IZOSAPI\_Application that owns this system.

The owning IZOSAPI\_Application interface.





<a id="add3e3631eadf7955b7b341179ff1eff8" name="add3e3631eadf7955b7b341179ff1eff8"></a>## [◆ ](#add3e3631eadf7955b7b341179ff1eff8)Tools

 [IOpticalSystemTools](interface_z_o_s_a_p_i_1_1_tools_1_1_i_optical_system_tools.xhtml) ZOSAPI.IOpticalSystem.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](_c_sharp_standalone_01_new_file_and_quickfocus_8cs-example.xhtml#a29), [CSharpStandalone\_02\_NSC\_ray\_trace.cs](_c_sharp_standalone_02__n_s_c_ray_trace_8cs-example.xhtml#a11), [CSharpStandalone\_03\_open\_file\_and\_optimise.cs](_c_sharp_standalone_03_open_file_and_optimise_8cs-example.xhtml#a28), [CSharpStandalone\_05\_Read\_ZRD\_File.cs](_c_sharp_standalone_05__read__z_r_d__file_8cs-example.xhtml#a11), [CSharpStandalone\_06\_nsc\_phase.cs](_c_sharp_standalone_06_nsc_phase_8cs-example.xhtml#a21), [CSharpStandalone\_07\_TiltDecenterAndMFOperand.cs](_c_sharp_standalone_07__tilt_decenter_and_m_f_operand_8cs-example.xhtml#a10), [CSharpStandalone\_08\_NSCEDetectorData.cs](_c_sharp_standalone_08__n_s_c_e_detector_data_8cs-example.xhtml#a19), [CSharpStandalone\_10\_NSC\_ZRD\_filter\_string.cs](_c_sharp_standalone_10__n_s_c__z_r_d_filter_string_8cs-example.xhtml#a12), [CSharpStandalone\_11\_Basic\_Seq.cs](_c_sharp_standalone_11__basic__seq_8cs-example.xhtml#a23), [CSharpStandalone\_14\_Seq\_Tolerance.cs](_c_sharp_standalone_14__seq__tolerance_8cs-example.xhtml#a15), [CSharpStandalone\_15\_Seq\_Optimization.cs](_c_sharp_standalone_15__seq__optimization_8cs-example.xhtml#a34), [CSharpStandalone\_17\_NSC\_BulkScatter.cs](_c_sharp_standalone_17__n_s_c__bulk_scatter_8cs-example.xhtml#a39), [CSharpStandalone\_18\_SetMulticonfiguration.cs](_c_sharp_standalone_18__set_multiconfiguration_8cs-example.xhtml#a20), [CSharpStandalone\_20\_export\_CAD\_File.cs](_c_sharp_standalone_20_export__c_a_d__file_8cs-example.xhtml#a11), [CSharpStandalone\_21\_White\_LED\_Phosphor.cs](_c_sharp_standalone_21__white__l_e_d__phosphor_8cs-example.xhtml#a39), [CSharpStandalone\_22\_seq\_spot\_diagram.cs](_c_sharp_standalone_22_seq_spot_diagram_8cs-example.xhtml#a11), [CSharpStandalone\_23\_ray\_fan\_native\_manual\_comparison.cs](_c_sharp_standalone_23_ray_fan_native_manual_comparison_8cs-example.xhtml#a12), [CSharpStandalone\_24\_nsc\_detectors.cs](_c_sharp_standalone_24_nsc_detectors_8cs-example.xhtml#a34), and [CSharpStandalone\_25\_source\_spectrum\_diffraction\_grating.cs](_c_sharp_standalone_25_source_spectrum_diffraction_grating_8cs-example.xhtml#a32).



<a id="a8c38bb004d5886ae03e10c238f9322cb" name="a8c38bb004d5886ae03e10c238f9322cb"></a>## [◆ ](#a8c38bb004d5886ae03e10c238f9322cb)UpdateMode

 [LensUpdateMode](namespace_z_o_s_a_p_i.xhtml#a928284b47bbcad0717a234689558250a) ZOSAPI.IOpticalSystem.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.