Skip to main content

ZOS-API interface 2024 R2 SP02

ZOSAPI.Analysis.Data.IAR_DataGridVector Interface Reference

Last update: 17.07.2025

Public Member Functions

double X (int rowX)
 
double Y (int colY)
 
double DeltaX (int rowX, int colY)
 
double DeltaY (int rowX, int colY)
 

Properties

String Description [get]
 
String XLabel [get]
 
String YLabel [get]
 
String ValueLabel [get]
 
uint Nx [get]
 
uint Ny [get]
 
double Dx [get]
 
double Dy [get]
 
double MinX [get]
 
double MinY [get]
 
double[,] DeltaXValues [get]
 
double[,] DeltaYValues [get]
 
IMatrixData DeltaXValueData [get]
 
IMatrixData DeltaYValueData [get]
 

Member Function Documentation

◆ DeltaX()

double ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaX ( int  rowX,
int  colY 
)

◆ DeltaY()

double ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaY ( int  rowX,
int  colY 
)

◆ X()

double ZOSAPI.Analysis.Data.IAR_DataGridVector.X ( int  rowX)

◆ Y()

double ZOSAPI.Analysis.Data.IAR_DataGridVector.Y ( int  colY)

Property Documentation

◆ DeltaXValueData

IMatrixData ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaXValueData
get

◆ DeltaXValues

double [,] ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaXValues
get

Usage (see Example 24 for a full sample)

C#

// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
ZOSAPI.Analysis.IA_ d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor;
double[,] d5_values = d5_results.GetDataGrid(0).Values;
double[,] Values
Definition: IAR_Base.cs:229
Properties and methods for retrieving analysis window data. This interface can be accessed via the IA...
Definition: IAR_Base.cs:21
IAR_DataGrid GetDataGrid(int index)
Base interface for all analysis windows. This interface can be accessed via the I_Analyses interface.
Definition: IA_Base.cs:29
IAR_ GetResults()
Gets the result data (if available) for the current analysis.
IAS_ GetSettings()
Gets the settings for the current analysis.
IMessage ApplyAndWaitForCompletion()
Re-runs the analysis with the current settings and waits for it to finish calculating.
Definition: IAS_DetectorViewer.cs:23
IAS_Detector Detector
Definition: IAS_DetectorViewer.cs:25
Definition: IAS_DetectorViewer.cs:6
Definition: IAS_FieldCurvatureAndDistortion.cs:5
Definition: IAS_FieldCurvatureAndDistortion.cs:5
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

C++

// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
IA_Ptr d5 = TheSystem->Analyses->New_Analysis(AnalysisIDM_DetectorViewer);
IAS_DetectorViewerPtr d5_set = d5->GetSettings();
d5_set->Detector->SetDetectorNumber(5);
d5_set->ShowAs = DetectorViewerShowAsTypes_FalseColor;
d5->ApplyAndWaitForCompletion();
IAR_Ptr d5_results = d5->GetResults();
// This is the easiest way to retrieve the data via COM.
// Create the array locally and pass it to the API to fill.
IAR_DataGridPtr gi = d5_results->GetDataGrid(0);
auto gid = gi->ValueData;
long cols = gid->Cols, rows = gid->Rows;
// Create the array. Note that if the array is too small, the application will crash when ReadData is called
double *valuesAF = new double[cols * rows];
gid->ReadData(cols * rows, valuesAF);
long loop_ctr = 0;
filepath = TheApplication->SamplesDir + "\\API\\CPP\\e24_nsc_detectors_falsecolor.txt";
textfile.open(filepath, fstream::trunc | ios::out);
for (long j = 0; j < rows; ++j) {
for (long k = 0; k < cols; ++k) {
textfile << valuesAF[loop_ctr++] << '\t';
}
textfile << endl;
}
textfile.close();
delete[] valuesAF;

Matlab

% changes default values for Detector Viewer
% pltos the Incoherent Irradiance in False Color
d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
d5_set = d5.GetSettings();
d5_set.Detector.SetDetectorNumber(5);
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor;
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults();
d5_values = d5_results.GetDataGrid(0).Values.double;

Python

# changes default values for Detector Viewer
# pltos the Incoherent Irradiance in False Color
d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer)
d5_set = d5.GetSettings()
d5_set.Detector.SetDetectorNumber(5)
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults()
d5_values = d5_results.GetDataGrid(0).Values

◆ DeltaYValueData

IMatrixData ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaYValueData
get

◆ DeltaYValues

double [,] ZOSAPI.Analysis.Data.IAR_DataGridVector.DeltaYValues
get

◆ Description

String ZOSAPI.Analysis.Data.IAR_DataGridVector.Description
get

◆ Dx

double ZOSAPI.Analysis.Data.IAR_DataGridVector.Dx
get

◆ Dy

double ZOSAPI.Analysis.Data.IAR_DataGridVector.Dy
get

◆ MinX

double ZOSAPI.Analysis.Data.IAR_DataGridVector.MinX
get

◆ MinY

double ZOSAPI.Analysis.Data.IAR_DataGridVector.MinY
get

◆ Nx

uint ZOSAPI.Analysis.Data.IAR_DataGridVector.Nx
get

◆ Ny

uint ZOSAPI.Analysis.Data.IAR_DataGridVector.Ny
get

◆ ValueLabel

String ZOSAPI.Analysis.Data.IAR_DataGridVector.ValueLabel
get

◆ XLabel

String ZOSAPI.Analysis.Data.IAR_DataGridVector.XLabel
get

◆ YLabel

String ZOSAPI.Analysis.Data.IAR_DataGridVector.YLabel
get

Connect with Ansys