Skip to main content

Zemax OpticStudio ZOS-API 2026 R1

Namespace ZOSAPI::SystemData

Last update: 13.03.2026

Definition:

Classes

Enumeration types

Enumeration type ZemaxSystemUnits

Definition:

enum ZemaxSystemUnits {
  Millimeters = 0,
  Centimeters = 1,
  Inches = 2,
  Meters = 3
}

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();

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();

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

Enumerator Centimeters

Enumerator Inches

Enumerator Meters

Enumeration type ZemaxSourceUnits

Definition:

enum ZemaxSourceUnits {
  Watts = 0,
  Lumens = 1,
  Joules = 2
}

Enumerator Watts

Enumerator Lumens

Enumerator Joules

Enumeration type ZemaxAnalysisUnits

Definition:

enum ZemaxAnalysisUnits {
  WattsPerMMSq = 0,
  WattsPerCMSq = 1,
  WattsPerinSq = 2,
  WattsPerMSq = 3,
  WattsPerftSq = 4
}

Enumerator WattsPerMMSq

Enumerator WattsPerCMSq

Enumerator WattsPerinSq

Enumerator WattsPerMSq

Enumerator WattsPerftSq

Enumeration type ZemaxUnitPrefix

Definition:

enum ZemaxUnitPrefix {
  Femto = 0,
  Pico = 1,
  Nano = 2,
  Micro = 3,
  Milli = 4,
  None = 5,
  Kilo = 6,
  Mega = 7,
  Giga = 8,
  Tera = 9
}

Enumerator Femto

Enumerator Pico

Enumerator Nano

Enumerator Micro

Enumerator Milli

Enumerator None

Enumerator Kilo

Enumerator Mega

Enumerator Giga

Enumerator Tera

Enumeration type ZemaxAfocalModeUnits

Definition:

enum ZemaxAfocalModeUnits {
  Microradians = 0,
  Milliradians = 1,
  Radians = 2,
  ArcSeconds = 3,
  ArcMinutes = 4,
  Degrees = 5
}

Enumerator Microradians

Enumerator Milliradians

Enumerator Radians

Enumerator ArcSeconds

Enumerator ArcMinutes

Enumerator Degrees

Enumeration type ZemaxMTFUnits

Definition:

enum ZemaxMTFUnits {
  CyclesPerMillimeter,
  CyclesPerMilliradian
}

Enumerator CyclesPerMillimeter

Enumerator CyclesPerMilliradian

Enumeration type ZemaxApertureType

Definition:

enum ZemaxApertureType {
  EntrancePupilDiameter = 0,
  ImageSpaceFNum = 1,
  ObjectSpaceNA = 2,
  FloatByStopSize = 3,
  ParaxialWorkingFNum = 4,
  ObjectConeAngle = 5
}

Enumerator EntrancePupilDiameter

Enumerator ImageSpaceFNum

Enumerator ObjectSpaceNA

Enumerator FloatByStopSize

Enumerator ParaxialWorkingFNum

Enumerator ObjectConeAngle

Enumeration type ZemaxApodizationType

Definition:

enum ZemaxApodizationType {
  Uniform = 0,
  Gaussian = 1,
  CosineCubed = 2
}

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
            TheSystemData.Wavelengths.SelectWavelengthPreset(WavelengthPreset.FdC_Visible);

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

Enumerator Gaussian

Enumerator CosineCubed

Enumeration type WavelengthPreset

Definition:

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
}

Usage (see Example 01 for a full sample)

C#

            // Wavelength preset
            bool slPreset = TheSystemData.Wavelengths.SelectWavelengthPreset(WavelengthPreset.d_0p587);

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

Enumerator Photopic_Bright

Enumerator Scotopic_Dark

Enumerator HeNe_0p6328

Enumerator HeNe_0p5438

Enumerator Argon_0p4880

Enumerator Argon_0p5145

Enumerator NDYAG_1p0641

Enumerator NDGlass_1p054

Enumerator CO2_10p60

Enumerator CrLiSAF_0p840

Enumerator TiAl203_0p760

Enumerator Ruby_0p6943

Enumerator HeCadmium_0p4416

Enumerator HeCadmium_0p3536

Enumerator HeCadmium_0p3250

Enumerator t_1p014

Enumerator r_0p707

Enumerator C_0p656

Enumerator d_0p587

Enumerator F_0p486

Enumerator g_0p436

Enumerator i_0p365

Enumerator Fp_0p365

Enumerator e_0p54607

Enumerator Cp_0p6438469

Enumerator FpeCp_Visible

Enumerator THz_193p10

Enumeration type QuadratureSteps

Definition:

enum QuadratureSteps {
  S2,
  S4,
  S6,
  S8,
  S10,
  S12
}

Enumerator S2

Enumerator S4

Enumerator S6

Enumerator S8

Enumerator S10

Enumerator S12

Enumeration type FieldType

Definition:

enum FieldType {
  Angle = 0,
  ObjectHeight = 1,
  ParaxialImageHeight = 2,
  RealImageHeight = 3,
  TheodoliteAngle = 4
}

Enumerator Angle

Enumerator ObjectHeight

Enumerator ParaxialImageHeight

Enumerator RealImageHeight

Enumerator TheodoliteAngle

Enumeration type PolarizationMethod

Definition:

enum PolarizationMethod {
  XAxisMethod = 0,
  YAxisMethod = 1,
  ZAxisMethod = 2
}

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;

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

Enumerator YAxisMethod

Enumerator ZAxisMethod

Enumeration type ReferenceOPDSetting

Definition:

enum ReferenceOPDSetting {
  Absolute = 0,
  Infinity = 1,
  ExitPupil = 2,
  Absolute2 = 3
}

Enumerator Absolute

Enumerator Infinity

Enumerator ExitPupil

Enumerator Absolute2

Enumeration type ParaxialRaysSetting

Definition:

enum ParaxialRaysSetting {
  ConsiderCoordinateBreaks = 0,
  IgnoreCoordinateBreaks = 1
}

Enumerator ConsiderCoordinateBreaks

Enumerator IgnoreCoordinateBreaks

Enumeration type HuygensIntegralSettings

Definition:

enum HuygensIntegralSettings {
  Auto = 0,
  Planar = 1,
  Spherical = 2
}

Enumerator Auto

Enumerator Planar

Enumerator Spherical

Enumeration type FNumberComputationType

Definition:

enum FNumberComputationType {
  TracingRays = 0,
  PupilSizePosition = 1
}

Enumerator TracingRays

Enumerator PupilSizePosition

Enumeration type RayAimingMethod

Definition:

enum RayAimingMethod {
  Off = 0,
  Paraxial = 1,
  Real = 2
}

Enumerator Off

Enumerator Paraxial

Enumerator Real

Enumeration type RayAimingType

Definition:

enum RayAimingType {
  Heuristic = 0,
  Optimize = 1
}

Enumerator Heuristic

Enumerator Optimize

Enumeration type FieldNormalizationType

Definition:

enum FieldNormalizationType {
  Radial = 0,
  Rectangular
}

Enumerator Radial

Enumerator Rectangular

Enumeration type FieldPattern

Definition:

enum FieldPattern {
  UniformY = 0,
  EqualAreaY,
  UniformX,
  EqualAreaX,
  Grid,
  UniformRadial,
  EqualAreaRadial
}

Enumerator UniformY

Enumerator EqualAreaY

Enumerator UniformX

Enumerator EqualAreaX

Enumerator Grid

Enumerator UniformRadial

Enumerator EqualAreaRadial

Enumeration type FieldColumn

Definition:

enum FieldColumn {
  Comment = 0,
  X = 1,
  Y = 2,
  Weight = 3,
  VDX = 4,
  VDY = 5,
  VCX = 6,
  VCY = 7,
  TAN = 8,
  VAN = 8
}

Enumerator Comment

Enumerator X

Enumerator Y

Enumerator Weight

Enumerator VDX

Enumerator VDY

Enumerator VCX

Enumerator VCY

Enumerator TAN

Enumerator VAN

Connect with Ansys