ZOSAPI.SystemData.ISDUnitsData Interface Reference
Last update: 17.07.2025System Explorer - Units Data. This interface can be accessed via the ISystemData interface. More...
Properties | |
| ZemaxSystemUnits | LensUnits [get, set] |
| ZemaxUnitPrefix | SourceUnitPrefix [get, set] |
| ZemaxSourceUnits | SourceUnits [get, set] |
| ZemaxUnitPrefix | AnalysisUnitPrefix [get, set] |
| ZemaxAnalysisUnits | AnalysisUnits [get, set] |
| ZemaxAfocalModeUnits | AfocalModeUnits [get, set] |
| ZemaxMTFUnits | MTFUnits [get, set] |
Detailed Description
System Explorer - Units Data. This interface can be accessed via the ISystemData interface.
Usage (see Example 12 for a full sample)
C#
// Change Lens Units to Inches
ZOSAPI.SystemData.ISDUnitsData sysUnits = TheSystem.SystemData.Units;
sysUnits.LensUnits = ZOSAPI.SystemData.ZemaxSystemUnits.Inches;
System Explorer - Units Data. This interface can be accessed via the ISystemData interface.
Definition: InterfacesSE.cs:620
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 Lens Units to Inches
ZOSAPI_Interfaces::ISDUnitsDataPtr sysUnits = TheSystem->SystemData->Units;
sysUnits->LensUnits = ZOSAPI_Interfaces::ZemaxSystemUnits_Inches;
Matlab
% Change Lens Units to Inches
sysUnits = TheSystem.SystemData.Units;
sysUnits.LensUnits = ZOSAPI.SystemData.ZemaxSystemUnits.Inches;
Python
# Change lens units to inches
sysUnits = TheSystem.SystemData.Units
sysUnits.LensUnits = ZOSAPI.SystemData.ZemaxSystemUnits.Inches
Property Documentation
◆ AfocalModeUnits
|
getset |
◆ AnalysisUnitPrefix
|
getset |
◆ AnalysisUnits
|
getset |
◆ LensUnits
|
getset |
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.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()
- Examples
- CSharpStandalone_11_Basic_Seq.cs.
◆ MTFUnits
|
getset |
◆ SourceUnitPrefix
|
getset |
◆ SourceUnits
|
getset |