Skip to main content

ZOS-API interface 2024 R1

ZOSAPI.Editors.IEditor Interface Reference

Last update: 17.07.2025

Base interface for all five editor types. All editors can be accessed via the IOpticalSystem interface. Note that this interface can be used to retrieve basic editor information only. For more detailed data, you should use one of the editor-specific interfaces: More...

Inheritance diagram for ZOSAPI.Editors.IEditor:

Public Member Functions

IEditorRow GetRowAt (int pos)
 Gets the row at the specified index (0 to NumberOfRows-1).
 
IEditorRow InsertRowAt (int pos)
 Inserts a new row at the specified index (0 to NumberOfRows). Note that some editors - such as the Lens Data Editor may not allow inserting new rows before the first row.
 
IEditorRow AddRow ()
 Adds a new row at the end of the editor.
 
bool DeleteRowAt (int pos)
 Deletes a row at the specified index (0 to NumberOfRows-1). Note that all editors require at least one row, and some editors may require more than that.
 
int DeleteRowsAt (int pos, int numberOfRows)
 Deletes one or more rows at the specified index (0 to NumberOfRows-1).
 
int DeleteAllRows ()
 Deletes all rows from the current editor.
 
bool ShowEditor ()
 Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
 
void HideEditor ()
 Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
 

Properties

EditorType Editor [get]
 Gets the type of this editor instance.
 
int NumberOfRows [get]
 Gets the number of rows in this editor. Note that this referes to surfaces, objects, or operands depending on editor type.
 
int MinColumn [get]
 The minimum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor.
 
int MaxColumn [get]
 The maximum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor.
 

Detailed Description

Base interface for all five editor types. All editors can be accessed via the IOpticalSystem interface. Note that this interface can be used to retrieve basic editor information only. For more detailed data, you should use one of the editor-specific interfaces:

IOpticalSystem.LDE

IOpticalSystem.NCE

IOpticalSystem.MFE

IOpticalSystem.MCE

IOpticalSystem.TDE

Member Function Documentation

◆ AddRow()

IEditorRow ZOSAPI.Editors.IEditor.AddRow ( )

Adds a new row at the end of the editor.

Returns
The newly added row.

◆ DeleteAllRows()

int ZOSAPI.Editors.IEditor.DeleteAllRows ( )

Deletes all rows from the current editor.

Returns
The number of rows successfully removed.

◆ DeleteRowAt()

bool ZOSAPI.Editors.IEditor.DeleteRowAt ( int  pos)

Deletes a row at the specified index (0 to NumberOfRows-1). Note that all editors require at least one row, and some editors may require more than that.

Parameters
posThe index of the row to remove.
Returns
true if the specified row was removed; otherwise, false.

◆ DeleteRowsAt()

int ZOSAPI.Editors.IEditor.DeleteRowsAt ( int  pos,
int  numberOfRows 
)

Deletes one or more rows at the specified index (0 to NumberOfRows-1).

Parameters
posThe index of the first row to remove.
numberOfRowsThe number of rows to remove.
Returns
The number of rows removed from the editor.

◆ GetRowAt()

IEditorRow ZOSAPI.Editors.IEditor.GetRowAt ( int  pos)

Gets the row at the specified index (0 to NumberOfRows-1).

Parameters
posThe row index.
Returns

◆ HideEditor()

void ZOSAPI.Editors.IEditor.HideEditor ( )

Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.

Returns

◆ InsertRowAt()

IEditorRow ZOSAPI.Editors.IEditor.InsertRowAt ( int  pos)

Inserts a new row at the specified index (0 to NumberOfRows). Note that some editors - such as the Lens Data Editor may not allow inserting new rows before the first row.

Parameters
posThe new row index.
Returns
The new row if successful; otherwise null.

◆ ShowEditor()

bool ZOSAPI.Editors.IEditor.ShowEditor ( )

Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.

Returns

Property Documentation

◆ Editor

EditorType ZOSAPI.Editors.IEditor.Editor
get

Gets the type of this editor instance.

This editor instance type.

◆ MaxColumn

int ZOSAPI.Editors.IEditor.MaxColumn
get

The maximum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor.

The maximum column index.

◆ MinColumn

int ZOSAPI.Editors.IEditor.MinColumn
get

The minimum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor.

The minimum column index.

◆ NumberOfRows

int ZOSAPI.Editors.IEditor.NumberOfRows
get

Gets the number of rows in this editor. Note that this referes to surfaces, objects, or operands depending on editor type.

The number of rows.

Connect with Ansys