Skip to main content

Zemax OpticStudio ZOS-API 2026 R1

Interface ZOSAPI::Editors::NCE::INCERow

Last update: 13.03.2026

Definition:

All data for a Non-Sequential Component Editor object. This interface can be accessed via the INonSeqEditor interface.

Inherits from:

Members

Properties

Property IsActive

Definition:

bool ZOSAPI.Editors.NCE.INCERow.IsActive

Gets a value indicating whether this instance is active (i.e. refers to a valid object in the system).

true if this instance is active; otherwise, false.

Return type: bool

Property ObjectNumber

Definition:

int ZOSAPI.Editors.NCE.INCERow.ObjectNumber

Gets the object number for this row.

The object number.

Return type: int

Property TypeName

Definition:

string ZOSAPI.Editors.NCE.INCERow.TypeName

Return type: string

Property Type

Definition:

ObjectType ZOSAPI.Editors.NCE.INCERow.Type

Return type: ObjectType

Property CurrentTypeSettings

Definition:

IObjectTypeSettings ZOSAPI.Editors.NCE.INCERow.CurrentTypeSettings

Gets settings for the current type (i.e. external files). Note that the current type can only be changed via the ChangeType method.

The current type settings.

Return type: IObjectTypeSettings

Property ObjectData

Definition:

IObject ZOSAPI.Editors.NCE.INCERow.ObjectData

Usage (see Example 17 for a full sample)

C#

            //Rectangular Volume
            //Scattering properties
            //Draw:opacity set to 50%
            IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
            Object_2.ChangeType(oType_2);
            Object_2.ZPosition = 2;
            Object_2.Material = "N-BK7";
            IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
            RectVolume2_data.X1HalfWidth = 12;
            RectVolume2_data.Y1HalfWidth = 12;
            RectVolume2_data.ZLength = 40;
            RectVolume2_data.X2HalfWidth = 12;
            RectVolume2_data.Y2HalfWidth = 12;
            INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
            RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
            INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
            RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

C++

    //Rectangular Volume
    //Scattering properties
    //Draw:opacity set to 50%
    IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
    Object_2->ChangeType(oType_2);
    Object_2->ZPosition = 2;
    Object_2->Material = "N-BK7";
    IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
    RectVolume2_data->X1HalfWidth = 12;
    RectVolume2_data->Y1HalfWidth = 12;
    RectVolume2_data->ZLength = 40;
    RectVolume2_data->X2HalfWidth = 12;
    RectVolume2_data->Y2HalfWidth = 12;
    INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
    RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
    INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
    RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlab

    % Rectangular Volume
    % Scattering Properties
    % Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
    Object_2.ChangeType(oType_2);
    Object_2.ZPosition = 2;
    Object_2.Material = 'N-BK7';
    RectVolume2_data = Object_2.ObjectData;
    RectVolume2_data.X1HalfWidth = 12;
    RectVolume2_data.Y1HalfWidth = 12;
    RectVolume2_data.ZLength = 40;
    RectVolume2_data.X2HalfWidth = 12;
    RectVolume2_data.Y2HalfWidth = 12;
    RectVolume2_volphysdata = Object_2.VolumePhysicsData;
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
    RectVolume2_DrawData = Object_2.DrawData;
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

    # Rectangular Volume
    # Scattering Properties
    # Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
    Object_2.ChangeType(oType_2)
    Object_2.ZPosition = 2
    Object_2.Material = "N-BK7"
    RectVolume2_data = Object_2.ObjectData
    RectVolume2_data.X1HalfWidth = 12
    RectVolume2_data.Y1HalfWidth = 12
    RectVolume2_data.ZLength = 40
    RectVolume2_data.X2HalfWidth = 12
    RectVolume2_data.Y2HalfWidth = 12
    RectVolume2_volphysdata = Object_2.VolumePhysicsData
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
    RectVolume2_DrawData = Object_2.DrawData
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50

i

Return type: IObject

Property TypeData

Definition:

INCETypeData ZOSAPI.Editors.NCE.INCERow.TypeData

Gets the object Type data.

The Type data interface.

Return type: INCETypeData

Property DrawData

Definition:

INCEDrawData ZOSAPI.Editors.NCE.INCERow.DrawData

Gets the object Draw data.

Usage (see Example 17 for a full sample)

C#

            //Rectangular Volume
            //Scattering properties
            //Draw:opacity set to 50%
            IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
            Object_2.ChangeType(oType_2);
            Object_2.ZPosition = 2;
            Object_2.Material = "N-BK7";
            IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
            RectVolume2_data.X1HalfWidth = 12;
            RectVolume2_data.Y1HalfWidth = 12;
            RectVolume2_data.ZLength = 40;
            RectVolume2_data.X2HalfWidth = 12;
            RectVolume2_data.Y2HalfWidth = 12;
            INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
            RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
            INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
            RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

C++

    //Rectangular Volume
    //Scattering properties
    //Draw:opacity set to 50%
    IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
    Object_2->ChangeType(oType_2);
    Object_2->ZPosition = 2;
    Object_2->Material = "N-BK7";
    IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
    RectVolume2_data->X1HalfWidth = 12;
    RectVolume2_data->Y1HalfWidth = 12;
    RectVolume2_data->ZLength = 40;
    RectVolume2_data->X2HalfWidth = 12;
    RectVolume2_data->Y2HalfWidth = 12;
    INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
    RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
    INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
    RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlabz

    % Rectangular Volume
    % Scattering Properties
    % Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
    Object_2.ChangeType(oType_2);
    Object_2.ZPosition = 2;
    Object_2.Material = 'N-BK7';
    RectVolume2_data = Object_2.ObjectData;
    RectVolume2_data.X1HalfWidth = 12;
    RectVolume2_data.Y1HalfWidth = 12;
    RectVolume2_data.ZLength = 40;
    RectVolume2_data.X2HalfWidth = 12;
    RectVolume2_data.Y2HalfWidth = 12;
    RectVolume2_volphysdata = Object_2.VolumePhysicsData;
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
    RectVolume2_DrawData = Object_2.DrawData;
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

    # Rectangular Volume
    # Scattering Properties
    # Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
    Object_2.ChangeType(oType_2)
    Object_2.ZPosition = 2
    Object_2.Material = "N-BK7"
    RectVolume2_data = Object_2.ObjectData
    RectVolume2_data.X1HalfWidth = 12
    RectVolume2_data.Y1HalfWidth = 12
    RectVolume2_data.ZLength = 40
    RectVolume2_data.X2HalfWidth = 12
    RectVolume2_data.Y2HalfWidth = 12
    RectVolume2_volphysdata = Object_2.VolumePhysicsData
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
    RectVolume2_DrawData = Object_2.DrawData
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50

The Draw data interface.

Return type: INCEDrawData

Property SourcesData

Definition:

INCESourcesData ZOSAPI.Editors.NCE.INCERow.SourcesData

Gets the object Sources data.

The Sources data interface.

Return type: INCESourcesData

Property CoatScatterData

Definition:

INCECoatScatterData ZOSAPI.Editors.NCE.INCERow.CoatScatterData

Gets the object Coat/Scatter data.

The Coat/Scatter data interface.

Return type: INCECoatScatterData

Property ScatterToData

Definition:

INCEScatterToData ZOSAPI.Editors.NCE.INCERow.ScatterToData

Gets the object Type data.

The Type data interface.

Return type: INCEScatterToData

Property VolumePhysicsData

Definition:

INCEVolumePhysicsData ZOSAPI.Editors.NCE.INCERow.VolumePhysicsData

Gets the object Volume Physics data.

Usage (see Example 17 for a full sample)

C#

            //Rectangular Volume
            //Scattering properties
            //Draw:opacity set to 50%
            IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
            Object_2.ChangeType(oType_2);
            Object_2.ZPosition = 2;
            Object_2.Material = "N-BK7";
            IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
            RectVolume2_data.X1HalfWidth = 12;
            RectVolume2_data.Y1HalfWidth = 12;
            RectVolume2_data.ZLength = 40;
            RectVolume2_data.X2HalfWidth = 12;
            RectVolume2_data.Y2HalfWidth = 12;
            INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
            RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
            INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
            RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

C++

    //Rectangular Volume
    //Scattering properties
    //Draw:opacity set to 50%
    IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
    Object_2->ChangeType(oType_2);
    Object_2->ZPosition = 2;
    Object_2->Material = "N-BK7";
    IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
    RectVolume2_data->X1HalfWidth = 12;
    RectVolume2_data->Y1HalfWidth = 12;
    RectVolume2_data->ZLength = 40;
    RectVolume2_data->X2HalfWidth = 12;
    RectVolume2_data->Y2HalfWidth = 12;
    INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
    RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
    INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
    RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlab

    % Rectangular Volume
    % Scattering Properties
    % Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
    Object_2.ChangeType(oType_2);
    Object_2.ZPosition = 2;
    Object_2.Material = 'N-BK7';
    RectVolume2_data = Object_2.ObjectData;
    RectVolume2_data.X1HalfWidth = 12;
    RectVolume2_data.Y1HalfWidth = 12;
    RectVolume2_data.ZLength = 40;
    RectVolume2_data.X2HalfWidth = 12;
    RectVolume2_data.Y2HalfWidth = 12;
    RectVolume2_volphysdata = Object_2.VolumePhysicsData;
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
    RectVolume2_DrawData = Object_2.DrawData;
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

    # Rectangular Volume
    # Scattering Properties
    # Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
    Object_2.ChangeType(oType_2)
    Object_2.ZPosition = 2
    Object_2.Material = "N-BK7"
    RectVolume2_data = Object_2.ObjectData
    RectVolume2_data.X1HalfWidth = 12
    RectVolume2_data.Y1HalfWidth = 12
    RectVolume2_data.ZLength = 40
    RectVolume2_data.X2HalfWidth = 12
    RectVolume2_data.Y2HalfWidth = 12
    RectVolume2_volphysdata = Object_2.VolumePhysicsData
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
    RectVolume2_DrawData = Object_2.DrawData
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50

The Volume Physics data interface.

Return type: INCEVolumePhysicsData

Property IndexData

Definition:

INCEIndexData ZOSAPI.Editors.NCE.INCERow.IndexData

Gets the object Index data.

The Index data interface.

Return type: INCEIndexData

Property DiffractionData

Definition:

INCEDiffractionData ZOSAPI.Editors.NCE.INCERow.DiffractionData

Gets the object Diffraction data.

The Diffraction data interface.

Return type: INCEDiffractionData

Property CADData

Definition:

INCECADData ZOSAPI.Editors.NCE.INCERow.CADData

Gets the object CAD data.

Usage (see Example 09 for a full sample)

C#

            //  Access the CAD settings for object 1
            INCECADData Obj1_CAD = Obj1.CADData;  //  Retrieve CAD data

            // Determine if the surface-to-face mappint is available for this object. 
            // If available, update the mapping based on the total number of surfaces in the system
            if (Obj1_CAD.HasFaceData)
            {
                if (Obj1_CAD.NumberOfSurfaces > 1)
                {
                    // Assign the last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties
                    Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces - 1);
                }
            }

C++

    //  Access the CAD settings for object 1
    INCECADDataPtr Obj1_CAD = Obj1->CADData;  //  Retrieve CAD data

    // Determine if surface-to-face mapping is available for this object. If yes, update the mapping.
    if (Obj1_CAD->HasFaceData)
    {
        if (Obj1_CAD->NumberOfSurfaces > 1) 
        {
            // Assign last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties
            Obj1_CAD->SetSurfaceFace(0, Obj1_CAD->NumberOfSurfaces - 1);
        }
    }

Matlab

    % Access the CAD settings for object 1
    Obj1_CAD = Obj1.CADData;  % Retrieve CAD data
    
    % Determine if the surface-to-face mapping is available for this
    % object. If yes, update the mapping
    if Obj1_CAD.HasFaceData
        if Obj1_CAD.NumberOfSurfaces > 1
            % Assign last face to surface 0. Now the first and last surface
            % will be defined with the same scatter and coating properties.
            Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces-1);   
        end
    end
    

Python

    # Access the CAD settings for object 1
    Obj1_CAD = Obj1.CADData  

    # Determine if the surface-to-face mapping is available for this object. If yes, update the mapping
    if Obj1_CAD.HasFaceData:
        if Obj1_CAD.NumberOfSurfaces > 1:
            # Assign the last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties. 
            Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces-1)  

The CAD data interface.

Return type: INCECADData

Property Comment

Definition:

string ZOSAPI.Editors.NCE.INCERow.Comment

Return type: string

Property CommentCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.CommentCell

Return type: IEditorCell

Property RefObject

Definition:

int ZOSAPI.Editors.NCE.INCERow.RefObject

Usage (see Example 17 for a full sample)

C#

            //Detector Rectangle
            IObjectTypeSettings oType_3 = Object_3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle);
            Object_3.RefObject = 2;
            Object_3.ZPosition = 42;
            Object_3.Material = "ABSORB";
            Object_3.ChangeType(oType_3);
            IObjectDetectorRectangle DetRect3_data = Object_3.ObjectData as IObjectDetectorRectangle;
            DetRect3_data.XHalfWidth = 15;
            DetRect3_data.YHalfWidth = 15;
            DetRect3_data.NumberXPixels = 25;
            DetRect3_data.NumberYPixels = 25;
            DetRect3_data.DataType = 0;
            DetRect3_data.Color = 2;
            DetRect3_data.Smoothing = 1;

C++

    //Detector Rectangle
    IObjectTypeSettingsPtr oType_3 = Object_3->GetObjectTypeSettings(ObjectType_DetectorRectangle);
    Object_3->RefObject = 2;
    Object_3->ZPosition = 42;
    Object_3->Material = "ABSORB";
    Object_3->ChangeType(oType_3);
    IObjectDetectorRectanglePtr DetRect3_data = Object_3->ObjectData;
    DetRect3_data->XHalfWidth = 15;
    DetRect3_data->YHalfWidth = 15;
    DetRect3_data->NumberXPixels = 25;
    DetRect3_data->NumberYPixels = 25;
    DetRect3_data->DataType = 0;
    DetRect3_data->Color = 2;
    DetRect3_data->Smoothing = 1;

Matlab

    % Detector Rectangle
    oType_3 = Object_3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle);
    Object_3.RefObject = 2;
    Object_3.ZPosition = 42;
    Object_3.Material = 'ABSORB';
    Object_3.ChangeType(oType_3);
    DetRect3_data = Object_3.ObjectData;
    DetRect3_data.XHalfWidth = 15;
    DetRect3_data.YHalfWidth = 15;
    DetRect3_data.NumberXPixels = 25;
    DetRect3_data.NumberYPixels = 25;
    DetRect3_data.DataType = 0;
    DetRect3_data.Color = 2;
    DetRect3_data.Smoothing = 1;

Python

    # Detector Rectangle
    oType_3 = Object_3.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DetectorRectangle)
    Object_3.RefObject = 2
    Object_3.ZPosition = 42
    Object_3.Material = "ABSORB"
    Object_3.ChangeType(oType_3)
    DetRect3_data = Object_3.ObjectData
    DetRect3_data.XHalfWidth = 15
    DetRect3_data.YHalfWidth = 15
    DetRect3_data.NumberXPixels = 25
    DetRect3_data.NumberYPixels = 25
    DetRect3_data.DataType = 0
    DetRect3_data.Color = 2
    DetRect3_data.Smoothing = 1

Return type: int

Property RefObjectCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.RefObjectCell

Return type: IEditorCell

Property InsideOf

Definition:

int ZOSAPI.Editors.NCE.INCERow.InsideOf

Return type: int

Property InsideOfCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.InsideOfCell

Return type: IEditorCell

Property XPosition

Definition:

double ZOSAPI.Editors.NCE.INCERow.XPosition

Usage (see Example 24 for a full sample)

C#

            // Sets positions & materials
            TheNCE.GetObjectAt(2).XPosition = 1.5;
            TheNCE.GetObjectAt(2).ZPosition = 9.99;
            TheNCE.GetObjectAt(2).Material = "ABSORB";

C++

    // Sets positions & materials
    TheNCE->GetObjectAt(2)->XPosition = 1.5;
    TheNCE->GetObjectAt(2)->ZPosition = 9.99;
    TheNCE->GetObjectAt(2)->Material = "ABSORB";

Matlab

    % Sets positions & materials
    TheNCE.GetObjectAt(2).XPosition = 1.5;
    TheNCE.GetObjectAt(2).ZPosition = 9.99;
    TheNCE.GetObjectAt(2).Material = 'ABSORB';

Python

    # Sets positions & materials
    TheNCE.GetObjectAt(2).XPosition = 1.5
    TheNCE.GetObjectAt(2).ZPosition = 9.99
    TheNCE.GetObjectAt(2).Material = 'ABSORB'

Return type: double

Property XPositionCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.XPositionCell

Return type: IEditorCell

Property YPosition

Definition:

double ZOSAPI.Editors.NCE.INCERow.YPosition

Return type: double

Property YPositionCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.YPositionCell

Return type: IEditorCell

Property ZPosition

Definition:

double ZOSAPI.Editors.NCE.INCERow.ZPosition

Usage (see Example 17 for a full sample)

C#

            //Rectangular Volume
            //Scattering properties
            //Draw:opacity set to 50%
            IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
            Object_2.ChangeType(oType_2);
            Object_2.ZPosition = 2;
            Object_2.Material = "N-BK7";
            IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
            RectVolume2_data.X1HalfWidth = 12;
            RectVolume2_data.Y1HalfWidth = 12;
            RectVolume2_data.ZLength = 40;
            RectVolume2_data.X2HalfWidth = 12;
            RectVolume2_data.Y2HalfWidth = 12;
            INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
            RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
            INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
            RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

C++

    //Rectangular Volume
    //Scattering properties
    //Draw:opacity set to 50%
    IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
    Object_2->ChangeType(oType_2);
    Object_2->ZPosition = 2;
    Object_2->Material = "N-BK7";
    IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
    RectVolume2_data->X1HalfWidth = 12;
    RectVolume2_data->Y1HalfWidth = 12;
    RectVolume2_data->ZLength = 40;
    RectVolume2_data->X2HalfWidth = 12;
    RectVolume2_data->Y2HalfWidth = 12;
    INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
    RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
    INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
    RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlab

    % Rectangular Volume
    % Scattering Properties
    % Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
    Object_2.ChangeType(oType_2);
    Object_2.ZPosition = 2;
    Object_2.Material = 'N-BK7';
    RectVolume2_data = Object_2.ObjectData;
    RectVolume2_data.X1HalfWidth = 12;
    RectVolume2_data.Y1HalfWidth = 12;
    RectVolume2_data.ZLength = 40;
    RectVolume2_data.X2HalfWidth = 12;
    RectVolume2_data.Y2HalfWidth = 12;
    RectVolume2_volphysdata = Object_2.VolumePhysicsData;
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
    RectVolume2_DrawData = Object_2.DrawData;
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

    # Rectangular Volume
    # Scattering Properties
    # Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
    Object_2.ChangeType(oType_2)
    Object_2.ZPosition = 2
    Object_2.Material = "N-BK7"
    RectVolume2_data = Object_2.ObjectData
    RectVolume2_data.X1HalfWidth = 12
    RectVolume2_data.Y1HalfWidth = 12
    RectVolume2_data.ZLength = 40
    RectVolume2_data.X2HalfWidth = 12
    RectVolume2_data.Y2HalfWidth = 12
    RectVolume2_volphysdata = Object_2.VolumePhysicsData
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
    RectVolume2_DrawData = Object_2.DrawData
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50

Return type: double

Property ZPositionCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.ZPositionCell

Return type: IEditorCell

Property TiltAboutX

Definition:

double ZOSAPI.Editors.NCE.INCERow.TiltAboutX

Return type: double

Property TiltAboutXCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.TiltAboutXCell

Return type: IEditorCell

Property TiltAboutY

Definition:

double ZOSAPI.Editors.NCE.INCERow.TiltAboutY

Return type: double

Property TiltAboutYCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.TiltAboutYCell

Return type: IEditorCell

Property TiltAboutZ

Definition:

double ZOSAPI.Editors.NCE.INCERow.TiltAboutZ

Return type: double

Property TiltAboutZCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.TiltAboutZCell

Return type: IEditorCell

Property Material

Definition:

string ZOSAPI.Editors.NCE.INCERow.Material

Usage (see Example 17 for a full sample)

C#

            //Rectangular Volume
            //Scattering properties
            //Draw:opacity set to 50%
            IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
            Object_2.ChangeType(oType_2);
            Object_2.ZPosition = 2;
            Object_2.Material = "N-BK7";
            IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
            RectVolume2_data.X1HalfWidth = 12;
            RectVolume2_data.Y1HalfWidth = 12;
            RectVolume2_data.ZLength = 40;
            RectVolume2_data.X2HalfWidth = 12;
            RectVolume2_data.Y2HalfWidth = 12;
            INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
            RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
            RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
            INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
            RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

C++

    //Rectangular Volume
    //Scattering properties
    //Draw:opacity set to 50%
    IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
    Object_2->ChangeType(oType_2);
    Object_2->ZPosition = 2;
    Object_2->Material = "N-BK7";
    IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
    RectVolume2_data->X1HalfWidth = 12;
    RectVolume2_data->Y1HalfWidth = 12;
    RectVolume2_data->ZLength = 40;
    RectVolume2_data->X2HalfWidth = 12;
    RectVolume2_data->Y2HalfWidth = 12;
    INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
    RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
    RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
    INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
    RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlab

    % Rectangular Volume
    % Scattering Properties
    % Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
    Object_2.ChangeType(oType_2);
    Object_2.ZPosition = 2;
    Object_2.Material = 'N-BK7';
    RectVolume2_data = Object_2.ObjectData;
    RectVolume2_data.X1HalfWidth = 12;
    RectVolume2_data.Y1HalfWidth = 12;
    RectVolume2_data.ZLength = 40;
    RectVolume2_data.X2HalfWidth = 12;
    RectVolume2_data.Y2HalfWidth = 12;
    RectVolume2_volphysdata = Object_2.VolumePhysicsData;
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
    RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
    RectVolume2_DrawData = Object_2.DrawData;
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

    # Rectangular Volume
    # Scattering Properties
    # Draw:opacity set to 50%
    oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
    Object_2.ChangeType(oType_2)
    Object_2.ZPosition = 2
    Object_2.Material = "N-BK7"
    RectVolume2_data = Object_2.ObjectData
    RectVolume2_data.X1HalfWidth = 12
    RectVolume2_data.Y1HalfWidth = 12
    RectVolume2_data.ZLength = 40
    RectVolume2_data.X2HalfWidth = 12
    RectVolume2_data.Y2HalfWidth = 12
    RectVolume2_volphysdata = Object_2.VolumePhysicsData
    RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
    RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
    RectVolume2_DrawData = Object_2.DrawData
    RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50

Return type: string

Property MaterialCell

Definition:

IEditorCell ZOSAPI.Editors.NCE.INCERow.MaterialCell

Return type: IEditorCell

Property ObjectId

Definition:

long ZOSAPI.Editors.NCE.INCERow.ObjectId

Return type: long

Public functions

Function GetObjectCell

IEditorCell ZOSAPI.Editors.NCE.INCERow.GetObjectCell(ObjectColumn Col)

Gets the specified object cell data.

Usage (see Example 24 for a full sample)

C#

            // Sets layout rays based on parameter number
            TheNCE.GetObjectAt(1).GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par1).IntegerValue = 100;
            // Sets analysis rays based on object data column
            ZOSAPI.Editors.NCE.IObjectSourceEllipse sourcedata = o1.ObjectData as ZOSAPI.Editors.NCE.IObjectSourceEllipse;
            sourcedata.NumberOfAnalysisRays = (int)1E6;

C++

    // Sets layout rays based on parameter number
    TheNCE->GetObjectAt(1)->GetObjectCell(ObjectColumn_Par1)->IntegerValue = 100;
    // Sets analysis rays based on object data column
    IObjectSourcesPtr sourcedata = o1->ObjectData;
    sourcedata->NumberOfAnalysisRays = (int)1E6;

Matlab

    % Sets layout rays based on parameter number
    TheNCE.GetObjectAt(1).GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par1).IntegerValue = 100;
    % Sets analysis rays based on object data column
    TheNCE.GetObjectAt(1).ObjectData.NumberOfAnalysisRays = 1E6;

Python

    # Sets layout rays based on parameter number
    TheNCE.GetObjectAt(1).GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par1).IntegerValue = 100
    # Sets analysis rays based on object data column
    o1.ObjectData.NumberOfAnalysisRays = 1E6

Parameters:

  • Col: The column.

Returns:

Parameters:

Return type: IEditorCell

Function AvailableObjectTypes

ObjectType[] ZOSAPI.Editors.NCE.INCERow.AvailableObjectTypes()

Gets all object types that are available for use.

Returns:

Return type: ObjectType[]

Function AvailableParameters

string[] ZOSAPI.Editors.NCE.INCERow.AvailableParameters()

Retrieve the headers for all cells used by this object.

Usage (see Example 09 for a full sample)

C#

            //  Access the CAD settings for object 1
            INCECADData Obj1_CAD = Obj1.CADData;  //  Retrieve CAD data

            // Determine if the surface-to-face mappint is available for this object. 
            // If available, update the mapping based on the total number of surfaces in the system
            if (Obj1_CAD.HasFaceData)
            {
                if (Obj1_CAD.NumberOfSurfaces > 1)
                {
                    // Assign the last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties
                    Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces - 1);
                }
            }

C++

    //  Access the CAD settings for object 1
    INCECADDataPtr Obj1_CAD = Obj1->CADData;  //  Retrieve CAD data

    // Determine if surface-to-face mapping is available for this object. If yes, update the mapping.
    if (Obj1_CAD->HasFaceData)
    {
        if (Obj1_CAD->NumberOfSurfaces > 1) 
        {
            // Assign last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties
            Obj1_CAD->SetSurfaceFace(0, Obj1_CAD->NumberOfSurfaces - 1);
        }
    }

Matlab

    % Access the CAD settings for object 1
    Obj1_CAD = Obj1.CADData;  % Retrieve CAD data
    
    % Determine if the surface-to-face mapping is available for this
    % object. If yes, update the mapping
    if Obj1_CAD.HasFaceData
        if Obj1_CAD.NumberOfSurfaces > 1
            % Assign last face to surface 0. Now the first and last surface
            % will be defined with the same scatter and coating properties.
            Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces-1);   
        end
    end
    

Python

    # Access the CAD settings for object 1
    Obj1_CAD = Obj1.CADData  

    # Determine if the surface-to-face mapping is available for this object. If yes, update the mapping
    if Obj1_CAD.HasFaceData:
        if Obj1_CAD.NumberOfSurfaces > 1:
            # Assign the last face to surface 0. Now, the first and last surfaces will be defined with the same scatter and coating properties. 
            Obj1_CAD.SetSurfaceFace(0, Obj1_CAD.NumberOfSurfaces-1)  

Returns:

Return type: string[]

Function GetObjectTypeSettings

IObjectTypeSettings ZOSAPI.Editors.NCE.INCERow.GetObjectTypeSettings(ObjectType type)

Create the settings for the specified type. Use this method to specify any extra data required to change to the appropriate object type (i.e. external files).

Usage (see Example 17 for a full sample)

C#

            //Source point
            IObjectTypeSettings oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint);
            Object_1.ChangeType(oType_1);
            IObjectSourcePoint Source1_data = Object_1.ObjectData as IObjectSourcePoint;
            Source1_data.NumberOfLayoutRays = 3;
            Source1_data.NumberOfAnalysisRays = 1000000;

C++

    //Source point
    IObjectTypeSettingsPtr oType_1 = Object_1->GetObjectTypeSettings(ObjectType_SourcePoint);
    Object_1->ChangeType(oType_1);
    IObjectSourcePointPtr Source1_data = Object_1->ObjectData;
    // Proterties NumberOfLayoutRays and NumberOfAnalysisRays belong to base interface IObjectSources. To use these properties, cast to IObjectSources first.
    IObjectSourcesPtr caseIObjSources = Source1_data;
    caseIObjSources->NumberOfLayoutRays = 3;
    caseIObjSources->NumberOfAnalysisRays = 1000000;

Matlab

    % Source point
    oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint);
    Object_1.ChangeType(oType_1);
    Source1_data = Object_1.ObjectData;
    Source1_data.NumberOfLayoutRays = 3;
    Source1_data.NumberOfAnalysisRays = 1000000;

Python

    # Source point
    oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint)
    Object_1.ChangeType(oType_1)
    Source1_data = Object_1.ObjectData
    Source1_data.NumberOfLayoutRays = 3
    Source1_data.NumberOfAnalysisRays = 1000000

Parameters:

  • type: The desired type.

Returns:

Parameters:

Return type: IObjectTypeSettings

Function ChangeType

bool ZOSAPI.Editors.NCE.INCERow.ChangeType(IObjectTypeSettings settings)

Changes the current object to the specified type. Use GetObjectTypeSettings to get the relevant settings.

Usage (see Example 17 for a full sample)

C#

            //Source point
            IObjectTypeSettings oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint);
            Object_1.ChangeType(oType_1);
            IObjectSourcePoint Source1_data = Object_1.ObjectData as IObjectSourcePoint;
            Source1_data.NumberOfLayoutRays = 3;
            Source1_data.NumberOfAnalysisRays = 1000000;

C++

    //Source point
    IObjectTypeSettingsPtr oType_1 = Object_1->GetObjectTypeSettings(ObjectType_SourcePoint);
    Object_1->ChangeType(oType_1);
    IObjectSourcePointPtr Source1_data = Object_1->ObjectData;
    // Proterties NumberOfLayoutRays and NumberOfAnalysisRays belong to base interface IObjectSources. To use these properties, cast to IObjectSources first.
    IObjectSourcesPtr caseIObjSources = Source1_data;
    caseIObjSources->NumberOfLayoutRays = 3;
    caseIObjSources->NumberOfAnalysisRays = 1000000;

Matlab

    % Source point
    oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint);
    Object_1.ChangeType(oType_1);
    Source1_data = Object_1.ObjectData;
    Source1_data.NumberOfLayoutRays = 3;
    Source1_data.NumberOfAnalysisRays = 1000000;

Python

    # Source point
    oType_1 = Object_1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.SourcePoint)
    Object_1.ChangeType(oType_1)
    Source1_data = Object_1.ObjectData
    Source1_data.NumberOfLayoutRays = 3
    Source1_data.NumberOfAnalysisRays = 1000000

Parameters:

  • settings: The settings.

Returns:

true if the change was successful.

Parameters:

Return type: bool

Function GetFacetedObjectData

IFaceData ZOSAPI.Editors.NCE.INCERow.GetFacetedObjectData()

Retrieve the facet data for any object marked with INCETypeData.ObjectIsADetector = true.

Returns:

The IFaceData interface with the triangle and intensity data for all facets.

Return type: IFaceData

Function GetMetadata

IMetadata ZOSAPI.Editors.NCE.INCERow.GetMetadata()

Return type: IMetadata

Function FindMaterialCatalog

string ZOSAPI.Editors.NCE.INCERow.FindMaterialCatalog()

Find the material catalog containing the material for this row.

Returns:

Return type: string

Function GetCoatingPerformanceData

INCECoatingPerformanceData ZOSAPI.Editors.NCE.INCERow.GetCoatingPerformanceData()

Gets the object Coating Performance data.

The Coating Performance data interface.

Return type: INCECoatingPerformanceData

Connect with Ansys