ZOSAPI.Tools.IOpticalSystemTools Interface Reference
Last update: 17.07.2025Methods to run various system-wide tools. This interface can be accessed via the IOpticalSystem interface. Note that only one ISystemTool can be open at a time; the previous tool must be closed using ISystemTool.Close before a new one can be opened. More...
Public Member Functions | |
| IBatchRayTrace | OpenBatchRayTrace () |
| Opens the Batch Ray Trace tool. | |
| INSCRayTrace | OpenNSCRayTrace () |
| Creates a new NSC Ray Trace instance. Note – only one instance of this tool can be open at a time. See the INSCRayTrace documentation for more information. | |
| IQuickAdjust | OpenQuickAdjust () |
| Opens the Quick Adjust tool. | |
| IQuickFocus | OpenQuickFocus () |
| Opens the Quick Focus tool. | |
| ILightningTrace | OpenLightningTrace () |
| Opens the Lightning Trace tool. | |
| IFindBestAsphere | OpenFindBestAsphere () |
| Opens the Find Best Asphere tool. | |
| IConvertAsphereType | OpenConvertAsphereTypes () |
| Opens the Convert Asphere Types tool. | |
| ILocalOptimization | OpenLocalOptimization () |
| Opens the Local Optimization tool. | |
| IGlobalOptimization | OpenGlobalOptimization () |
| Opens the Global Optimization tool. | |
| IHammerOptimization | OpenHammerOptimization () |
| Opens the Hammer Optimization tool. | |
| ITolerancing | OpenTolerancing () |
| Opens the Tolerancing tool. | |
| IRestoreArchive | OpenRestoreZAR () |
| Opens the Restore Zemax Archive (ZAR) tool. | |
| ICreateArchive | OpenCreateZAR () |
| Opens the Create Zemax Archive (ZAR) tool. | |
| IRestoreProject | OpenRestoreProject () |
| ICreateProject | OpenCreateProject () |
| IExportCAD | OpenExportCAD () |
| Opens the Export to Cad tool. | |
| IScale | OpenScale () |
| Opens the Scale Lens tool. | |
| IMFCalculator | OpenMeritFunctionCalculator () |
| Opens the Merit Function Calculator tool. | |
| ILensCatalogs | OpenLensCatalogs () |
| Opens the Lens Catalogs tool. | |
| IConvertToNSCGroup | OpenConvertToNSCGroup () |
| Opens the Convert to NSC Group tool. | |
| IDesignLockdown | OpenDesignLockdown () |
| Opens the Design Lockdown tool. | |
| ICriticalRaysetGenerator | OpenCriticalRaysetGenerator () |
| Opens the critical rayset generator tool. | |
| bool | RemoveAllVariables () |
| Removes all variables in the system. | |
| int | SetAllRadiiVariable () |
| Makes all radii in the system variable. | |
| int | SetAllThicknessesVariable () |
| Makes all thicknesses in the system variable. | |
| double[] | CreateDoubleVector (int numElements) |
| Creates a 1D array of doubles. This is primarily useful when you need to create a SAFEARRAY for access to the API from a COM-based interface. | |
| double[,] | CreateDoubleMatrix (int Rows, int Cols) |
| Creates a 2D matrix double doubles. This is primarily useful when you need to create a SAFEARRAY for access to the API from a COM-based interface. | |
| IZRDReader | OpenRayDatabaseReader () |
| IComputeRMSSpotSize | OpenRMSSpotRadiusCalculator () |
| Opens the RMS spot radius calculator. Note that this is only valid in sequential mode. | |
| double | GetConversionToSystemUnits (ZemaxSystemUnits fromUnits) |
| Gets the conversion factor from the specified units to system units. Returns s such that [x' = s * x] where x is in "fromUnits" and x' is in system units. | |
| double | GetConversionFromSystemUnits (ZemaxSystemUnits toUnits) |
| Gets the conversion factor from system units to the specified units. Returns s such that [x' = s * x] where x is in system units and x' is in "toUnits". | |
| IShadedModelVisualizationExport | OpenShadedModelVisualizationExport () |
| Opens the Shaded Model Visualization export tool. This tool allows retreieving a list of triangles representing the solid models used for Shaded Model visualization. | |
| IMaterialsCatalog | OpenMaterialsCatalog () |
| IQuickSensitivity | OpenQuickSensitivity () |
| IToleranceDataViewer | OpenToleranceDataViewer () |
| IRayAimingWizard | OpenRayAimingWizard () |
| IHPCSettings | GetHPCSettingsFromPrefs () |
| IHPCSettings | GetHPCSettingsCustom (int nodeCount, HPCNodeSize instanceType) |
| INSCRayTrace | OpenNSCRayTrace_HPC (IHPCSettings hpcSettings) |
| ITolerancing | OpenTolerancing_HPC (IHPCSettings hpcSettings) |
| IGlobalOptimization | OpenGlobalOptimization_HPC (IHPCSettings hpcSettings) |
| IHammerOptimization | OpenHammerOptimization_HPC (IHPCSettings hpcSettings) |
| IPointTools | GetPointTools () |
| IHullTools | GetHullTools () |
| IFileManager | OpenFileManager () |
| FileManager.IConvertProjectToFileTool | OpenProjectToFileConverter () |
| IExportToSpeosLensSystem | OpenExportToSpeosLensSystem () |
| IExportToSpeosWhitebox | OpenExportToSpeosWhitebox () |
| IAPIUtilities | GetUtilities () |
Properties | |
| ISystemTool | CurrentTool [get] |
| Gets the currently open tool. Note that if a tool is already open, all attempts to open a new tool will fail. | |
| int | Progress [get] |
| Gets the progress of the currently running tool, if the tool reports incremental progress. | |
| string | Status [get] |
| Gets the status of the currently running tool, if the tool reports incremental status messages. | |
| bool | IsRunning [get] |
| Gets a value indicating whether the CurrentTool is currently running asynchronously. | |
| ILayouts | Layouts [get] |
| IMessage | LastError [get] |
Detailed Description
Methods to run various system-wide tools. This interface can be accessed via the IOpticalSystem interface. Note that only one ISystemTool can be open at a time; the previous tool must be closed using ISystemTool.Close before a new one can be opened.
Usage (see Example 15 for a full sample)
C#
C++
Matlab
Python
Member Function Documentation
◆ CreateDoubleMatrix()
| double[,] ZOSAPI.Tools.IOpticalSystemTools.CreateDoubleMatrix | ( | int | Rows, |
| int | Cols | ||
| ) |
Creates a 2D matrix double doubles. This is primarily useful when you need to create a SAFEARRAY for access to the API from a COM-based interface.
- Parameters
-
Rows The number of rows in the output matrix. Cols The number of columns in the output matrix.
- Returns
◆ CreateDoubleVector()
| double[] ZOSAPI.Tools.IOpticalSystemTools.CreateDoubleVector | ( | int | numElements | ) |
Creates a 1D array of doubles. This is primarily useful when you need to create a SAFEARRAY for access to the API from a COM-based interface.
- Parameters
-
numElements The number elements in the output array.
- Returns
◆ GetConversionFromSystemUnits()
| double ZOSAPI.Tools.IOpticalSystemTools.GetConversionFromSystemUnits | ( | ZemaxSystemUnits | toUnits | ) |
Gets the conversion factor from system units to the specified units. Returns s such that [x' = s * x] where x is in system units and x' is in "toUnits".
- Parameters
-
toUnits To units.
- Returns
◆ GetConversionToSystemUnits()
| double ZOSAPI.Tools.IOpticalSystemTools.GetConversionToSystemUnits | ( | ZemaxSystemUnits | fromUnits | ) |
Gets the conversion factor from the specified units to system units. Returns s such that [x' = s * x] where x is in "fromUnits" and x' is in system units.
- Parameters
-
fromUnits From units.
- Returns
◆ GetHPCSettingsCustom()
| IHPCSettings ZOSAPI.Tools.IOpticalSystemTools.GetHPCSettingsCustom | ( | int | nodeCount, |
| HPCNodeSize | instanceType | ||
| ) |
◆ GetHPCSettingsFromPrefs()
| IHPCSettings ZOSAPI.Tools.IOpticalSystemTools.GetHPCSettingsFromPrefs | ( | ) |
◆ GetHullTools()
| IHullTools ZOSAPI.Tools.IOpticalSystemTools.GetHullTools | ( | ) |
◆ GetPointTools()
| IPointTools ZOSAPI.Tools.IOpticalSystemTools.GetPointTools | ( | ) |
◆ GetUtilities()
| IAPIUtilities ZOSAPI.Tools.IOpticalSystemTools.GetUtilities | ( | ) |
◆ OpenBatchRayTrace()
| IBatchRayTrace ZOSAPI.Tools.IOpticalSystemTools.OpenBatchRayTrace | ( | ) |
Opens the Batch Ray Trace tool.
Usage (see Example 22 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenConvertAsphereTypes()
| IConvertAsphereType ZOSAPI.Tools.IOpticalSystemTools.OpenConvertAsphereTypes | ( | ) |
Opens the Convert Asphere Types tool.
- Returns
◆ OpenConvertToNSCGroup()
| IConvertToNSCGroup ZOSAPI.Tools.IOpticalSystemTools.OpenConvertToNSCGroup | ( | ) |
Opens the Convert to NSC Group tool.
Usage (see Example 14 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenCreateProject()
| ICreateProject ZOSAPI.Tools.IOpticalSystemTools.OpenCreateProject | ( | ) |
◆ OpenCreateZAR()
| ICreateArchive ZOSAPI.Tools.IOpticalSystemTools.OpenCreateZAR | ( | ) |
Opens the Create Zemax Archive (ZAR) tool.
- Returns
◆ OpenCriticalRaysetGenerator()
| ICriticalRaysetGenerator ZOSAPI.Tools.IOpticalSystemTools.OpenCriticalRaysetGenerator | ( | ) |
Opens the critical rayset generator tool.
- Returns
◆ OpenDesignLockdown()
| IDesignLockdown ZOSAPI.Tools.IOpticalSystemTools.OpenDesignLockdown | ( | ) |
Opens the Design Lockdown tool.
- Returns
◆ OpenExportCAD()
| IExportCAD ZOSAPI.Tools.IOpticalSystemTools.OpenExportCAD | ( | ) |
Opens the Export to Cad tool.
Usage (see Example 20 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenExportToSpeosLensSystem()
| IExportToSpeosLensSystem ZOSAPI.Tools.IOpticalSystemTools.OpenExportToSpeosLensSystem | ( | ) |
◆ OpenExportToSpeosWhitebox()
| IExportToSpeosWhitebox ZOSAPI.Tools.IOpticalSystemTools.OpenExportToSpeosWhitebox | ( | ) |
◆ OpenFileManager()
| IFileManager ZOSAPI.Tools.IOpticalSystemTools.OpenFileManager | ( | ) |
◆ OpenFindBestAsphere()
| IFindBestAsphere ZOSAPI.Tools.IOpticalSystemTools.OpenFindBestAsphere | ( | ) |
Opens the Find Best Asphere tool.
- Returns
◆ OpenGlobalOptimization()
| IGlobalOptimization ZOSAPI.Tools.IOpticalSystemTools.OpenGlobalOptimization | ( | ) |
Opens the Global Optimization tool.
- Returns
◆ OpenGlobalOptimization_HPC()
| IGlobalOptimization ZOSAPI.Tools.IOpticalSystemTools.OpenGlobalOptimization_HPC | ( | IHPCSettings | hpcSettings | ) |
◆ OpenHammerOptimization()
| IHammerOptimization ZOSAPI.Tools.IOpticalSystemTools.OpenHammerOptimization | ( | ) |
Opens the Hammer Optimization tool.
Usage (see Example 03 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenHammerOptimization_HPC()
| IHammerOptimization ZOSAPI.Tools.IOpticalSystemTools.OpenHammerOptimization_HPC | ( | IHPCSettings | hpcSettings | ) |
◆ OpenLensCatalogs()
| ILensCatalogs ZOSAPI.Tools.IOpticalSystemTools.OpenLensCatalogs | ( | ) |
Opens the Lens Catalogs tool.
- Returns
◆ OpenLightningTrace()
| ILightningTrace ZOSAPI.Tools.IOpticalSystemTools.OpenLightningTrace | ( | ) |
Opens the Lightning Trace tool.
- Returns
◆ OpenLocalOptimization()
| ILocalOptimization ZOSAPI.Tools.IOpticalSystemTools.OpenLocalOptimization | ( | ) |
Opens the Local Optimization tool.
Usage (see Example 03 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenMaterialsCatalog()
| IMaterialsCatalog ZOSAPI.Tools.IOpticalSystemTools.OpenMaterialsCatalog | ( | ) |
◆ OpenMeritFunctionCalculator()
| IMFCalculator ZOSAPI.Tools.IOpticalSystemTools.OpenMeritFunctionCalculator | ( | ) |
Opens the Merit Function Calculator tool.
- Returns
◆ OpenNSCRayTrace()
| INSCRayTrace ZOSAPI.Tools.IOpticalSystemTools.OpenNSCRayTrace | ( | ) |
Creates a new NSC Ray Trace instance. Note – only one instance of this tool can be open at a time. See the INSCRayTrace documentation for more information.
Usage (see Example 02 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenNSCRayTrace_HPC()
| INSCRayTrace ZOSAPI.Tools.IOpticalSystemTools.OpenNSCRayTrace_HPC | ( | IHPCSettings | hpcSettings | ) |
◆ OpenProjectToFileConverter()
| FileManager.IConvertProjectToFileTool ZOSAPI.Tools.IOpticalSystemTools.OpenProjectToFileConverter | ( | ) |
◆ OpenQuickAdjust()
| IQuickAdjust ZOSAPI.Tools.IOpticalSystemTools.OpenQuickAdjust | ( | ) |
Opens the Quick Adjust tool.
- Returns
◆ OpenQuickFocus()
| IQuickFocus ZOSAPI.Tools.IOpticalSystemTools.OpenQuickFocus | ( | ) |
Opens the Quick Focus tool.
Usage (see Example 15 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenQuickSensitivity()
| IQuickSensitivity ZOSAPI.Tools.IOpticalSystemTools.OpenQuickSensitivity | ( | ) |
◆ OpenRayAimingWizard()
| IRayAimingWizard ZOSAPI.Tools.IOpticalSystemTools.OpenRayAimingWizard | ( | ) |
◆ OpenRayDatabaseReader()
| IZRDReader ZOSAPI.Tools.IOpticalSystemTools.OpenRayDatabaseReader | ( | ) |
◆ OpenRestoreProject()
| IRestoreProject ZOSAPI.Tools.IOpticalSystemTools.OpenRestoreProject | ( | ) |
◆ OpenRestoreZAR()
| IRestoreArchive ZOSAPI.Tools.IOpticalSystemTools.OpenRestoreZAR | ( | ) |
Opens the Restore Zemax Archive (ZAR) tool.
- Returns
◆ OpenRMSSpotRadiusCalculator()
| IComputeRMSSpotSize ZOSAPI.Tools.IOpticalSystemTools.OpenRMSSpotRadiusCalculator | ( | ) |
Opens the RMS spot radius calculator. Note that this is only valid in sequential mode.
- Returns
◆ OpenScale()
| IScale ZOSAPI.Tools.IOpticalSystemTools.OpenScale | ( | ) |
Opens the Scale Lens tool.
Usage (see Example 11 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenShadedModelVisualizationExport()
| IShadedModelVisualizationExport ZOSAPI.Tools.IOpticalSystemTools.OpenShadedModelVisualizationExport | ( | ) |
Opens the Shaded Model Visualization export tool. This tool allows retreieving a list of triangles representing the solid models used for Shaded Model visualization.
- Returns
◆ OpenToleranceDataViewer()
| IToleranceDataViewer ZOSAPI.Tools.IOpticalSystemTools.OpenToleranceDataViewer | ( | ) |
◆ OpenTolerancing()
| ITolerancing ZOSAPI.Tools.IOpticalSystemTools.OpenTolerancing | ( | ) |
Opens the Tolerancing tool.
Usage (see Example 14 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ OpenTolerancing_HPC()
| ITolerancing ZOSAPI.Tools.IOpticalSystemTools.OpenTolerancing_HPC | ( | IHPCSettings | hpcSettings | ) |
◆ RemoveAllVariables()
| bool ZOSAPI.Tools.IOpticalSystemTools.RemoveAllVariables | ( | ) |
◆ SetAllRadiiVariable()
| int ZOSAPI.Tools.IOpticalSystemTools.SetAllRadiiVariable | ( | ) |
Makes all radii in the system variable.
Usage (see Example 15 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ SetAllThicknessesVariable()
| int ZOSAPI.Tools.IOpticalSystemTools.SetAllThicknessesVariable | ( | ) |
Makes all thicknesses in the system variable.
- Returns
Property Documentation
◆ CurrentTool
|
get |
Gets the currently open tool. Note that if a tool is already open, all attempts to open a new tool will fail.
The current tool if one is currently open; otherwise, null.
◆ IsRunning
|
get |
Gets a value indicating whether the CurrentTool is currently running asynchronously.
true if a tool is currently running; otherwise, false.
◆ LastError
|
get |
◆ Layouts
|
get |
◆ Progress
|
get |
Gets the progress of the currently running tool, if the tool reports incremental progress.
The current progress percentage, if available.
◆ Status
|
get |
Gets the status of the currently running tool, if the tool reports incremental status messages.
The current status, if available.