Interface ZOSAPI::Editors::TDE::IToleranceDataEditor
Last update: 13.03.2026
Definition:
This interface defines all properties and methods needed to interact with the Tolerance Data Editor. This interface can be accessed via the IOpticalSystem interface.
Inherits from:
Members
- AddOperand
- AddRow
- CopyOperands
- CopyOperandsFrom
- DeleteAllRows
- DeleteRowAt
- DeleteRowsAt
- Editor
- FirstColumn
- GetOperandAt
- GetRowAt
- HideEditor
- HideTDE
- InsertNewOperandAt
- InsertRowAt
- LastColumn
- LoadToleranceFile
- MaxColumn
- MinColumn
- NSCToleranceWizard
- NumberOfOperands
- NumberOfRows
- RemoveOperandAt
- RemoveOperandsAt
- RowToOperandOffset
- SaveToleranceFile
- SEQToleranceWizard
- ShowEditor
- ShowTDE
Properties
Property RowToOperandOffset
Definition:
int ZOSAPI.Editors.TDE.IToleranceDataEditor.RowToOperandOffset
Offset from a row index to operand index (always 1).
The row to operand offset.
Return type: int
Property NumberOfOperands
Definition:
int ZOSAPI.Editors.TDE.IToleranceDataEditor.NumberOfOperands
Gets the total number of operands in the current system.
The number of operands.
Return type: int
Property FirstColumn
Definition:
ToleranceColumn ZOSAPI.Editors.TDE.IToleranceDataEditor.FirstColumn
Gets the first available column.
The first column.
Return type: ToleranceColumn
Property LastColumn
Definition:
ToleranceColumn ZOSAPI.Editors.TDE.IToleranceDataEditor.LastColumn
Gets the last available column.
The last column.
Return type: ToleranceColumn
Property NSCToleranceWizard
Definition:
INSCToleranceWizard ZOSAPI.Editors.TDE.IToleranceDataEditor.NSCToleranceWizard
The Nonsequential Tolerance Wizard.
Returns:
Return type: INSCToleranceWizard
Property SEQToleranceWizard
Definition:
ISEQToleranceWizard ZOSAPI.Editors.TDE.IToleranceDataEditor.SEQToleranceWizard
The Sequential Tolerance Wizard.
Usage (see Example 14 for a full sample)
C#
// Set up the Tolerance Wizard and run it
ZOSAPI.Wizards.ISEQToleranceWizard tWiz = TheSystem.TDE.SEQToleranceWizard;
// Specify surface tolerances
tWiz.SurfaceRadius = 0.1;
tWiz.SurfaceThickness = 0.1;
tWiz.SurfaceDecenterX = 0.1;
tWiz.SurfaceDecenterY = 0.1;
tWiz.SurfaceTiltX = 0.2;
tWiz.SurfaceTiltY = 0.2;
// Specify element tolerances
tWiz.ElementDecenterX = 0.1;
tWiz.ElementDecenterY = 0.1;
tWiz.ElementTiltXDegrees = 0.2;
tWiz.ElementTiltYDegrees = 0.2;
// Specify tolerances not to be used
tWiz.IsSurfaceSandAIrregularityUsed = false;
tWiz.IsIndexUsed = false;
tWiz.IsIndexAbbePercentageUsed = false;
// Select OK
tWiz.OK();
C++
// Set up the Tolerance Wizard and run it
// Need to make sure you have x64 set to the platform, otherwise COM will throw an error
ZOSAPI_Interfaces::ISEQToleranceWizardPtr tWiz = TheSystem->TDE->SEQToleranceWizard;
// Specify surface tolerances
tWiz->ToleranceSettings->SurfaceRadius = 0.1;
tWiz->ToleranceSettings->SurfaceThickness = 0.1;
tWiz->ToleranceSettings->SurfaceDecenterX = 0.1;
tWiz->ToleranceSettings->SurfaceDecenterY = 0.1;
tWiz->ToleranceSettings->SurfaceTiltX = 0.2;
tWiz->ToleranceSettings->SurfaceTiltY = 0.2;
// Specify element tolerances
tWiz->ToleranceSettings->ElementDecenterX = 0.1;
tWiz->ToleranceSettings->ElementDecenterY = 0.1;
tWiz->ToleranceSettings->ElementTiltXDegrees = 0.2;
tWiz->ToleranceSettings->ElementTiltYDegrees = 0.2;
// Specify tolerances not to be used
tWiz->ToleranceSettings->IsSurfaceSandAIrregularityUsed = false;
tWiz->ToleranceSettings->IsIndexUsed = false;
tWiz->ToleranceSettings->IsIndexAbbePercentageUsed = false;
// Select OK
tWiz->ToleranceSettings->CommonSettings->OK();
Matlab
% Set up the Tolerance Wizard and run it
tWiz = TheSystem.TDE.SEQToleranceWizard;
% Specify surface tolerances
tWiz.SurfaceRadius = 0.1;
tWiz.SurfaceThickness = 0.1;
tWiz.SurfaceDecenterX = 0.1;
tWiz.SurfaceDecenterY = 0.1;
tWiz.SurfaceTiltX = 0.2;
tWiz.SurfaceTiltY = 0.2;
% Specify element tolerances
tWiz.ElementDecenterX = 0.1;
tWiz.ElementDecenterY = 0.1;
tWiz.ElementTiltXDegrees = 0.2;
tWiz.ElementTiltYDegrees = 0.2;
% Specify tolerances not to be used
tWiz.IsSurfaceSandAIrregularityUsed = false;
tWiz.IsIndexUsed = false;
tWiz.IsIndexAbbePercentageUsed = false;
% Select OK
tWiz.OK();
Python
# Set up Tolerance Wizard and run it
tWiz = TheSystem.TDE.SEQToleranceWizard
# Specify surface tolerances
tWiz.SurfaceRadius = 0.1
tWiz.SurfaceThickness = 0.1
tWiz.SurfaceDecenterX = 0.1
tWiz.SurfaceDecenterY = 0.1
tWiz.SurfaceTiltX = 0.2
tWiz.SurfaceTiltY = 0.2
# Specify element tolerances
tWiz.ElementDecenterX = 0.1
tWiz.ElementDecenterY = 0.1
tWiz.ElementTiltXDegrees = 0.2
tWiz.ElementTiltYDegrees = 0.2
# Specify tolerances not to be used
tWiz.IsSurfaceSandAIrregularityUsed = False
tWiz.IsIndexUsed = False
tWiz.IsIndexAbbePercentageUsed = False
tWiz.OK()
Returns:
Return type: ISEQToleranceWizard
Public functions
Function GetOperandAt
ITDERow ZOSAPI.Editors.TDE.IToleranceDataEditor.GetOperandAt(int OperandNumber)
Gets the data for the specified operand.
Parameters:
- OperandNumber: The operand number (1 to NumberOfOperands).
Returns:
Parameters:
- int OperandNumber
Return type: ITDERow
Function InsertNewOperandAt
ITDERow ZOSAPI.Editors.TDE.IToleranceDataEditor.InsertNewOperandAt(int OperandNumber)
Inserts a new operand at the specified position.
Parameters:
- OperandNumber: The operand number (1 to NumberOfOperands+1).
Returns:
Parameters:
- int OperandNumber
Return type: ITDERow
Function AddOperand
ITDERow ZOSAPI.Editors.TDE.IToleranceDataEditor.AddOperand()
Adds a new operand as the last operand in the system.
Returns:
Return type: ITDERow
Function RemoveOperandAt
bool ZOSAPI.Editors.TDE.IToleranceDataEditor.RemoveOperandAt(int OperandNumber)
Removes the operand at the specified location.
Parameters:
- OperandNumber: The operand number (1 to NumberOfOperands).
Returns:
true if the operand was successfully remove; otherwise, false.
Parameters:
- int OperandNumber
Return type: bool
Function RemoveOperandsAt
int ZOSAPI.Editors.TDE.IToleranceDataEditor.RemoveOperandsAt(int OperandNumber, int numOperands)
Removes one or more operands at the specified location.
Parameters:
- OperandNumber: The first operand number to remove (1 to NumberOfOperands).
- numOperands: The number operands to remove.
Returns:
The number of operands actually removed.
Parameters:
- int OperandNumber
- int numOperands
Return type: int
Function ShowTDE
bool ZOSAPI.Editors.TDE.IToleranceDataEditor.ShowTDE()
Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
Returns:
Return type: bool
Function HideTDE
void ZOSAPI.Editors.TDE.IToleranceDataEditor.HideTDE()
Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
Returns:
Return type: void
Function LoadToleranceFile
bool ZOSAPI.Editors.TDE.IToleranceDataEditor.LoadToleranceFile(string fileName)
Loads a tolerance file, replacing the tolerances in the current lens.
Parameters:
- fileName: Name of the input file.
If the file name contains the complete path, such as C:\MYDIR\MYLENS.TOL, then the specified file will be loaded. If the path is left off, then the [data]\Tolerance folder will be used.
Returns:
Exceptions:
- System.ArgumentException: Invalid file name
Parameters:
- string fileName
Return type: bool
Function SaveToleranceFile
void ZOSAPI.Editors.TDE.IToleranceDataEditor.SaveToleranceFile(string fileName)
Saves the current tolerances to a file.
Parameters:
- fileName: Name of the output file.
If the file name contains the complete path, such as C:\MYDIR\MYLENS.TOL, then the specified file will be created. If the path is left off, then the [data]\Tolerance folder will be used.
Exceptions:
- System.ArgumentException: Invalid file name
Parameters:
- string fileName
Return type: void
Function CopyOperands
int ZOSAPI.Editors.TDE.IToleranceDataEditor.CopyOperands(int fromOperandNumber, int NumberOfOperands, int toOperandNumber)
Copy and paste the specified number of operands from one location to another.
Note that it is okay for the source and destination to overlap.
Parameters:
- fromOperandNumber: First operand number to copy (1 to NumberOfOperands).
- NumberOfOperands: The number of operands to copy.
- toOperandNumber: Row to start inserting the operands (1 to NumberOfOperands+1).
Returns:
The number of operands actually copied.
Parameters:
- int fromOperandNumber
- int NumberOfOperands
- int toOperandNumber
Return type: int
Function CopyOperandsFrom
int ZOSAPI.Editors.TDE.IToleranceDataEditor.CopyOperandsFrom(IToleranceDataEditor fromEditor, int fromOperandNumber, int NumberOfOperands, int toOperandNumber)
Copy and paste the specified number of operands from one location (in the specified system) to another location (in this system). Note that it is okay for the source and destination to overlap.
Parameters:
- fromEditor: System to copy the operands from.
- fromOperandNumber: First operand number to copy (1 to NumberOfOperands).
- NumberOfOperands: The number of operands to copy.
- toOperandNumber: To operand number (1 to NumberOfOperands+1).
Returns:
The number of operands actually copied.
Parameters:
- IToleranceDataEditor fromEditor
- int fromOperandNumber
- int NumberOfOperands
- int toOperandNumber
Return type: int