Skip to main content

ZOS-API interface 2024 R1

ZOSAPI.SystemData Namespace Reference

Last update: 17.07.2025

Classes

interface  IField
 System field data. This interface can be accessed via the IFields interface. More...
 
interface  IFields
 System Explorer - Fields Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDAdvancedData
 System Explorer - Advanced Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDApertureData
 System Explorer - Aperture Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDEnvironmentData
 System Explorer - Environment Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDFiles
 System Explorer - Files Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDMaterialCatalogData
 System Explorer - Material Catalogs Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDNamedFilters
 System Explorer - Named Filters Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDNonSeqData
 System Explorer - Non-Sequential Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDPolarizationData
 System Explorer - Polarization Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDRayAimingData
 System Explorer - Ray Aiming Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDTitleNotes
 System Explorer - Notes Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISDUnitsData
 System Explorer - Units Data. This interface can be accessed via the ISystemData interface. More...
 
interface  ISurfaceSelection
 
interface  ISystemData
 Interfaces and methods for changing all System Explorer data. This interface can be accessed via the IOpticalSystem interface. More...
 
interface  IWavelength
 System wavelength data. This interface can be accessed via the IWavelengths interface. More...
 
interface  IWavelengths
 System Explorer - Wavelengths Data. This interface can be accessed via the ISystemData interface. More...
 

Enumerations

enum  ZemaxSystemUnits { Millimeters = 0 , Centimeters = 1 , Inches = 2 , Meters = 3 }
 
enum  ZemaxSourceUnits { Watts = 0 , Lumens = 1 , Joules = 2 }
 
enum  ZemaxAnalysisUnits {
  WattsPerMMSq = 0 , WattsPerCMSq = 1 , WattsPerinSq = 2 , WattsPerMSq = 3 ,
  WattsPerftSq = 4
}
 
enum  ZemaxUnitPrefix {
  Femto = 0 , Pico = 1 , Nano = 2 , Micro = 3 ,
  Milli = 4 , None = 5 , Kilo = 6 , Mega = 7 ,
  Giga = 8 , Tera = 9
}
 
enum  ZemaxAfocalModeUnits {
  Microradians = 0 , Milliradians = 1 , Radians = 2 , ArcSeconds = 3 ,
  ArcMinutes = 4 , Degrees = 5
}
 
enum  ZemaxMTFUnits { CyclesPerMillimeter , CyclesPerMilliradian }
 
enum  ZemaxApertureType {
  EntrancePupilDiameter = 0 , ImageSpaceFNum = 1 , ObjectSpaceNA = 2 , FloatByStopSize = 3 ,
  ParaxialWorkingFNum = 4 , ObjectConeAngle = 5
}
 
enum  ZemaxApodizationType { Uniform = 0 , Gaussian = 1 , CosineCubed = 2 }
 
enum  WavelengthPreset {
  FdC_Visible = 0 , Photopic_Bright = 1 , Scotopic_Dark = 2 , HeNe_0p6328 = 3 ,
  HeNe_0p5438 = 4 , Argon_0p4880 = 5 , Argon_0p5145 = 6 , NDYAG_1p0641 = 7 ,
  NDGlass_1p054 = 8 , CO2_10p60 = 9 , CrLiSAF_0p840 = 10 , TiAl203_0p760 = 11 ,
  Ruby_0p6943 = 12 , HeCadmium_0p4416 = 13 , HeCadmium_0p3536 = 14 , HeCadmium_0p3250 = 15 ,
  t_1p014 = 16 , r_0p707 = 17 , C_0p656 = 18 , d_0p587 = 19 ,
  F_0p486 = 20 , g_0p436 = 21 , i_0p365 = 22 , Fp_0p365 = 23 ,
  e_0p54607 = 24 , Cp_0p6438469 = 25 , FpeCp_Visible = 26 , THz_193p10 = 27
}
 
enum  QuadratureSteps {
  S2 , S4 , S6 , S8 ,
  S10 , S12
}
 
enum  FieldType {
  Angle = 0 , ObjectHeight = 1 , ParaxialImageHeight = 2 , RealImageHeight = 3 ,
  TheodoliteAngle = 4
}
 
enum  PolarizationMethod { XAxisMethod = 0 , YAxisMethod = 1 , ZAxisMethod = 2 }
 
enum  ReferenceOPDSetting { Absolute = 0 , Infinity = 1 , ExitPupil = 2 , Absolute2 = 3 }
 
enum  ParaxialRaysSetting { ConsiderCoordinateBreaks = 0 , IgnoreCoordinateBreaks = 1 }
 
enum  HuygensIntegralSettings { Auto = 0 , Planar = 1 , Spherical = 2 }
 
enum  FNumberComputationType { TracingRays = 0 , PupilSizePosition = 1 }
 
enum  RayAimingMethod { Off = 0 , Paraxial = 1 , Real = 2 }
 
enum  RayAimingType { Heuristic = 0 , Optimize = 1 }
 
enum  FieldNormalizationType { Radial = 0 , Rectangular }
 
enum  FieldPattern {
  UniformY = 0 , EqualAreaY , UniformX , EqualAreaX ,
  Grid , UniformRadial , EqualAreaRadial
}
 
enum  FieldColumn {
  Comment = 0 , X = 1 , Y = 2 , Weight = 3 ,
  VDX = 4 , VDY = 5 , VCX = 6 , VCY = 7 ,
  TAN = 8 , VAN = 8
}
 

Enumeration Type Documentation

◆ FieldColumn

Enumerator
Comment 
Weight 
VDX 
VDY 
VCX 
VCY 
TAN 
VAN 

◆ FieldNormalizationType

Enumerator
Radial 
Rectangular 

◆ FieldPattern

Enumerator
UniformY 
EqualAreaY 
UniformX 
EqualAreaX 
Grid 
UniformRadial 
EqualAreaRadial 

◆ FieldType

Enumerator
Angle 
ObjectHeight 
ParaxialImageHeight 
RealImageHeight 
TheodoliteAngle 

◆ FNumberComputationType

Enumerator
TracingRays 
PupilSizePosition 

◆ HuygensIntegralSettings

Enumerator
Auto 
Planar 
Spherical 

◆ ParaxialRaysSetting

Enumerator
ConsiderCoordinateBreaks 
IgnoreCoordinateBreaks 

◆ PolarizationMethod

Usage (see Example 12 for a full sample)

C#

// Change polarization axis reference to be Y
ZOSAPI.SystemData.ISDPolarizationData sysPol = TheSystem.SystemData.Polarization;
sysPol.Method = ZOSAPI.SystemData.PolarizationMethod.YAxisMethod;
System Explorer - Polarization Data. This interface can be accessed via the ISystemData interface.
Definition: InterfacesSE.cs:438
Definition: InterfacesSE.cs:11
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

C++

// Change polarization axis reference to be Y
ZOSAPI_Interfaces::ISDPolarizationDataPtr sysPol = TheSystem->SystemData->Polarization;
sysPol->Method = ZOSAPI_Interfaces::PolarizationMethod_YAxisMethod;

Matlab

% Change polarization axis reference to be Y
sysPol = TheSystem.SystemData.Polarization;
sysPol.Method = ZOSAPI.SystemData.PolarizationMethod.YAxisMethod;

Python

# Change polarization axis reference to be Y
sysPol = TheSystem.SystemData.Polarization
sysPol.Method = ZOSAPI.SystemData.PolarizationMethod.YAxisMethod
Enumerator
XAxisMethod 
YAxisMethod 
ZAxisMethod 

◆ QuadratureSteps

Enumerator
S2 
S4 
S6 
S8 
S10 
S12 

◆ RayAimingMethod

Enumerator
Off 
Paraxial 
Real 

◆ RayAimingType

Enumerator
Heuristic 
Optimize 

◆ ReferenceOPDSetting

Enumerator
Absolute 
Infinity 
ExitPupil 
Absolute2 

◆ WavelengthPreset

Usage (see Example 01 for a full sample)

C#

// Wavelength preset
bool slPreset = TheSystemData.Wavelengths.SelectWavelengthPreset(WavelengthPreset.d_0p587);
WavelengthPreset
Definition: InterfacesSE.cs:138

C++

// Wavelength preset
bool slPreset = TheSystemData->Wavelengths->SelectWavelengthPreset(WavelengthPreset_d_0p587);

Matlab

% Wavelength preset
slPreset = TheSystemData.Wavelengths.SelectWavelengthPreset(ZOSAPI.SystemData.WavelengthPreset.d_0p587);

Python

# Wavelength preset
slPreset = TheSystemData.Wavelengths.SelectWavelengthPreset(ZOSAPI.SystemData.WavelengthPreset.d_0p587)
Enumerator
FdC_Visible 
Photopic_Bright 
Scotopic_Dark 
HeNe_0p6328 
HeNe_0p5438 
Argon_0p4880 
Argon_0p5145 
NDYAG_1p0641 
NDGlass_1p054 
CO2_10p60 
CrLiSAF_0p840 
TiAl203_0p760 
Ruby_0p6943 
HeCadmium_0p4416 
HeCadmium_0p3536 
HeCadmium_0p3250 
t_1p014 
r_0p707 
C_0p656 
d_0p587 
F_0p486 
g_0p436 
i_0p365 
Fp_0p365 
e_0p54607 
Cp_0p6438469 
FpeCp_Visible 
THz_193p10 

◆ ZemaxAfocalModeUnits

Enumerator
Microradians 
Milliradians 
Radians 
ArcSeconds 
ArcMinutes 
Degrees 

◆ ZemaxAnalysisUnits

Enumerator
WattsPerMMSq 
WattsPerCMSq 
WattsPerinSq 
WattsPerMSq 
WattsPerftSq 

◆ ZemaxApertureType

Enumerator
EntrancePupilDiameter 
ImageSpaceFNum 
ObjectSpaceNA 
FloatByStopSize 
ParaxialWorkingFNum 
ObjectConeAngle 

◆ ZemaxApodizationType

Usage (see Example 11 for a full sample)

C#

// Changing System Explorer Settings
// Set Aperture
ISystemData TheSystemData = TheSystem.SystemData;
TheSystemData.Aperture.ApertureValue = 20;
TheSystem.SystemData.MaterialCatalogs.AddCatalog("SCHOTT");
// Set Apodization Type to Gaussian, and set apodization factor to 1
TheSystemData.Aperture.ApodizationType = ZemaxApodizationType.Gaussian;
TheSystemData.Aperture.ApodizationFactor = 1;
// Set Wavelength
bool AddCatalog(string catalog)
Adds the specified material to the system.
Interfaces and methods for changing all System Explorer data. This interface can be accessed via the ...
Definition: InterfacesSE.cs:275
ISDMaterialCatalogData MaterialCatalogs
Definition: InterfacesSE.cs:283
IWavelengths Wavelengths
Definition: InterfacesSE.cs:277
bool SelectWavelengthPreset(WavelengthPreset preset)
Replaces all system wavelengths with a preset definition.
ZemaxApodizationType
Definition: InterfacesSE.cs:117

C++

// Changing System Explorer Settings
// Set Aperture
ISystemDataPtr TheSystemData = TheSystem->SystemData;
TheSystemData->Aperture->ApertureValue = 20;
ISDMaterialCatalogDataPtr(TheSystem->SystemData->MaterialCatalogs)->AddCatalog("SCHOTT");
// Set Apodization Type to Gaussian, and set apodization factor to 1
TheSystemData->Aperture->ApodizationType = ZemaxApodizationType_Gaussian;
TheSystemData->Aperture->ApodizationFactor = 1;
// Set Wavelength
TheSystemData->Wavelengths->SelectWavelengthPreset(WavelengthPreset_FdC_Visible);

Matlab

% Changing System Explorer Settings
% Set Aperture
TheSystemData = TheSystem.SystemData;
TheSystemData.Aperture.ApertureValue = 20;
TheSystem.SystemData.MaterialCatalogs.AddCatalog('SCHOTT');
% Set Apodization Type to Gaussian, and set apodization factor to 1
TheSystemData.Aperture.ApodizationType = ZOSAPI.SystemData.ZemaxApodizationType.Gaussian;
TheSystemData.Aperture.ApodizationFactor = 1;
% Set Wavelength
TheSystemData.Wavelengths.SelectWavelengthPreset(ZOSAPI.SystemData.WavelengthPreset.FdC_Visible);

Python

# Changing System Explorer Settings
# Set Aperture
TheSystemData = TheSystem.SystemData
TheSystemData.Aperture.ApertureValue = 20
TheSystem.SystemData.MaterialCatalogs.AddCatalog('SCHOTT')
# Set Apodization Type to Gaussian, and set apodization factor to 1
TheSystemData.Aperture.ApodizationType = 1 # ApodizationType 0 = uniform; 1 = gaussian; 2 = Cosine Cubed
TheSystemData.Aperture.ApodizationFactor = 1
# Set Wavelength
TheSystemData.Wavelengths.SelectWavelengthPreset(ZOSAPI.SystemData.WavelengthPreset.FdC_Visible)
Enumerator
Uniform 
Gaussian 
CosineCubed 

◆ ZemaxMTFUnits

Enumerator
CyclesPerMillimeter 
CyclesPerMilliradian 

◆ ZemaxSourceUnits

Enumerator
Watts 
Lumens 
Joules 

◆ ZemaxSystemUnits

Usage (see Example 11 for a full sample)

C#

// Set system lens units to inches, scale all values with Scale Lens tool
// For demonstration only. This file is new, so it has default units mm.
ZemaxSystemUnits unit = TheSystemData.Units.LensUnits;
// Open Scale Lens tool
ScaleLens = TheSystem.Tools.OpenScale();
// Apply Tool Settings
ScaleLens.ScaleByUnits = true;
ScaleLens.ScaleToUnit = ScaleToUnits.Inches;
ScaleLens.RunAndWaitForCompletion();
ScaleLens.Close();
ZemaxSystemUnits
Definition: InterfacesSE.cs:27

C++

// Set system lens units to inches, scale all values with Scale Lens tool
// For demonstration only. This file is new, so it has default units mm.
ZemaxSystemUnits unit = TheSystemData->Units->LensUnits;
// Open Scale Lens tool
IScalePtr ScaleLens = TheSystem->Tools->OpenScale();
// Apply Tool Settings
ScaleLens->ScaleByUnits = true;
ScaleLens->ScaleToUnit = ScaleToUnits_Inches;
ISystemToolPtr baseTool = ScaleLens;
baseTool->RunAndWaitForCompletion();
baseTool->Close();

Matlab

% Set system lens units to inches, scale all values with Scale Lens tool
unit = TheSystemData.Units.LensUnits; % For demonstration only. This file is new, so it has default units mm.
ScaleLens = TheSystem.Tools.OpenScale(); % Open Scale Lens tool
% Apply Tool Settings
ScaleLens.ScaleByUnits = true;
ScaleLens.ScaleToUnit = ZOSAPI.Tools.General.ScaleToUnits.Inches;
ScaleLens.RunAndWaitForCompletion();
ScaleLens.Close();
Definition: Tools.cs:696
Definition: FileSource.cs:4

Python

# Set system lens units to inches, scale all values with Scale Lens tool
unit = TheSystemData.Units.LensUnits # For demonstration only. This file is new, so it has default units mm.
ScaleLens = TheSystem.Tools.OpenScale() # Open Scale Lens tool
# Apply Tool Settings
ScaleLens.ScaleByUnits = True
ScaleLens.ScaleToUnit = 2 # 0=millimeters; 1=centimeters; 2=inches; 3=meters
# Cast to ISystemTool interface to gain access to Run
ScaleLens.RunAndWaitForCompletion()
ScaleLens.Close()
Enumerator
Millimeters 
Centimeters 
Inches 
Meters 

◆ ZemaxUnitPrefix

Enumerator
Femto 
Pico 
Nano 
Micro 
Milli 
None 
Kilo 
Mega 
Giga 
Tera 

Connect with Ansys