Skip to main content

ZOS-API interface 2024 R2 SP02

ZOSAPI.Editors.NCE.IObjectTypeSettings Interface Reference

Last update: 17.07.2025

This interface is used for selecting any files required by a object, and for changing object types. This interface can be accessed via the INCERow interface. More...

Public Member Functions

string[] GetFileNames1 ()
 Gets all available files for this type.
 
string[] GetFileNames2 ()
 Gets all available secondary files for this type.
 

Properties

ObjectType Type [get]
 Gets the object type for this interface.
 
bool IsValid [get]
 Gets a value indicating whether all settings are valid.
 
bool RequiresFile1 [get]
 Gets a value indicating whether this object type requires an external file to function.
 
string FileName1 [get, set]
 Gets or sets the currently selected file name.
 
bool RequiresFile2 [get]
 Gets a value indicating whether this object type requires an secondary external file to function (such as ObjectType.GridSagFrontBack).
 
string FileName2 [get, set]
 Gets or sets the currently selected secondary file name.
 

Detailed Description

This interface is used for selecting any files required by a object, and for changing object types. This interface can be accessed via the INCERow interface.

Examples
CSharpStandalone_08_NSCEDetectorData.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_17_NSC_BulkScatter.cs, and CSharpStandalone_21_White_LED_Phosphor.cs.

Member Function Documentation

◆ GetFileNames1()

string[] ZOSAPI.Editors.NCE.IObjectTypeSettings.GetFileNames1 ( )

Gets all available files for this type.

Returns

◆ GetFileNames2()

string[] ZOSAPI.Editors.NCE.IObjectTypeSettings.GetFileNames2 ( )

Gets all available secondary files for this type.

Returns

Property Documentation

◆ FileName1

string ZOSAPI.Editors.NCE.IObjectTypeSettings.FileName1
getset

Gets or sets the currently selected file name.

Usage (see Example 21 for a full sample)

C#

// Set 1st object as a Source File
INCERow Object_1 = TheNCE.GetObjectAt(1);
IObjectTypeSettings Typeset_SourceFile = Object_1.GetObjectTypeSettings(ObjectType.SourceFile);
Typeset_SourceFile.FileName1 = "RAYFILE_LB_T67C_100K_190608_ZEMAX.DAT";
Object_1.ChangeType(Typeset_SourceFile);
Object_1.GetObjectCell(ObjectColumn.Par2).IntegerValue = 1000;
Object_1.GetObjectCell(ObjectColumn.Par3).DoubleValue = 2.485572;
Object_1.GetObjectCell(ObjectColumn.Par8).DoubleValue = 0.47;
Object_1.GetObjectCell(ObjectColumn.Par9).DoubleValue = 0.47;
double DoubleValue
Gets or sets the double precision value of this cell. Note that if DataType is not CellDataType....
Definition: InterfacesEditors.cs:340
int IntegerValue
Gets or sets the integer value of this cell. Note that if DataType is not CellDataType....
Definition: InterfacesEditors.cs:319
All data for a Non-Sequential Component Editor object. This interface can be accessed via the INonSeq...
Definition: InterfacesNCE.cs:1198
bool ChangeType(IObjectTypeSettings settings)
Changes the current object to the specified type. Use GetObjectTypeSettings to get the relevant setti...
IEditorCell GetObjectCell(ObjectColumn Col)
Gets the specified object cell data.
IObjectTypeSettings GetObjectTypeSettings(ObjectType type)
Create the settings for the specified type. Use this method to specify any extra data required to cha...
This interface is used for selecting any files required by a object, and for changing object types....
Definition: InterfacesNCE.cs:1110
ObjectColumn
Definition: InterfacesNCE.cs:199
ObjectType
All supported non-sequential object types.
Definition: InterfacesNCE.cs:38

C++

// Set 1st object as a Source File
INCERowPtr Object_1 = TheNCE->GetObjectAt(1);
IObjectTypeSettingsPtr Typeset_SourceFile = Object_1->GetObjectTypeSettings(ObjectType_SourceFile);
Typeset_SourceFile->FileName1 = "RAYFILE_LB_T67C_100K_190608_ZEMAX.DAT";
Object_1->ChangeType(Typeset_SourceFile);
Object_1->GetObjectCell(ObjectColumn_Par1)->IntegerValue = 5;
Object_1->GetObjectCell(ObjectColumn_Par2)->IntegerValue = 1000;
Object_1->GetObjectCell(ObjectColumn_Par3)->DoubleValue = 2.485572;
Object_1->GetObjectCell(ObjectColumn_Par8)->DoubleValue = 0.47;
Object_1->GetObjectCell(ObjectColumn_Par9)->DoubleValue = 0.47;

Matlab

% Set 1st object as a Source File
Object_1 = TheNCE.GetObjectAt(1);
Typeset_SourceFile = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourceFile);
Typeset_SourceFile.FileName1 = 'RAYFILE_LB_T67C_100K_190608_ZEMAX.DAT';
Object_1.ChangeType(Typeset_SourceFile);
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par1).IntegerValue = 5;
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par2).IntegerValue = 1000;
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par3).DoubleValue = 2.485572;
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par8).DoubleValue = 0.47;
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par9).DoubleValue = 0.47;
Definition: InterfacesNCE.cs:19
Definition: InterfacesEditors.cs:12
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

Python

# Set 1st object as a Source File
Object_1 = TheNCE.GetObjectAt(1)
Typeset_SourceFile = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourceFile)
Typeset_SourceFile.FileName1 = 'RAYFILE_LB_T67C_100K_190608_ZEMAX.DAT'
Object_1.ChangeType(Typeset_SourceFile)
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par1).IntegerValue = 5
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par2).IntegerValue = 1000
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par3).DoubleValue = 2.485572
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par8).DoubleValue = 0.47
Object_1.GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par9).DoubleValue = 0.47

The name of the file. Note that only files returned by GetFileNames1 are allowed.

◆ FileName2

string ZOSAPI.Editors.NCE.IObjectTypeSettings.FileName2
getset

Gets or sets the currently selected secondary file name.

The name of the file. Note that only files returned by GetFileNames2 are allowed.

◆ IsValid

bool ZOSAPI.Editors.NCE.IObjectTypeSettings.IsValid
get

Gets a value indicating whether all settings are valid.

true if this instance is valid; otherwise, false.

◆ RequiresFile1

bool ZOSAPI.Editors.NCE.IObjectTypeSettings.RequiresFile1
get

Gets a value indicating whether this object type requires an external file to function.

true if a file is required; otherwise, false.

◆ RequiresFile2

bool ZOSAPI.Editors.NCE.IObjectTypeSettings.RequiresFile2
get

Gets a value indicating whether this object type requires an secondary external file to function (such as ObjectType.GridSagFrontBack).

true if a file is required; otherwise, false.

◆ Type

ObjectType ZOSAPI.Editors.NCE.IObjectTypeSettings.Type
get

Gets the object type for this interface.

Usage (see Example 24 for a full sample)

C#

// Changes Object Type
TheNCE.GetObjectAt(1).ChangeType(o1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourceEllipse));
o2.ChangeType(o2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.AsphericSurface2));
o3.ChangeType(o3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.StandardLens));
o4.ChangeType(o4.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorColor));
o5.ChangeType(o5.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle));

C++

// Changes Object Type
IObjectTypeSettingsPtr oType_1 = o1->GetObjectTypeSettings(ObjectType_SourceEllipse);
o1->ChangeType(oType_1);
o2->ChangeType((IObjectTypeSettingsPtr)o2->GetObjectTypeSettings(ObjectType_AsphericSurface2));
o3->ChangeType((IObjectTypeSettingsPtr)o3->GetObjectTypeSettings(ObjectType_StandardLens));
o4->ChangeType((IObjectTypeSettingsPtr)o4->GetObjectTypeSettings(ObjectType_DetectorColor));
o5->ChangeType((IObjectTypeSettingsPtr)o5->GetObjectTypeSettings(ObjectType_DetectorRectangle));

Matlab

% Changes Object Type
TheNCE.GetObjectAt(1).ChangeType(o1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourceEllipse));
o2.ChangeType(o2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.AsphericSurface2));
o3.ChangeType(o3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.StandardLens));
o4.ChangeType(o4.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorColor));
o5.ChangeType(o5.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle));

Python

# Changes Object Type
TheNCE.GetObjectAt(1).ChangeType(o1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourceEllipse))
o2.ChangeType(o2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.AsphericSurface2))
o3.ChangeType(o3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.StandardLens))
o4.ChangeType(o4.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorColor))
o5.ChangeType(o5.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle))

The type.

Connect with Ansys