For the User defined object DLL, Zemax passes a variable “data” to the function UserObjectDefinition. However, I have not been able to find any documentation on what each element of this array is. The examples provide some of the parameters (for example the CoatingSample.dll file gives the first 15 parameters and a few others up to parameter 34, see the code below from the example). Where can I find documentation to understand what other parameters I have access to from this data structure?
The data ZEMAX sends is formatted as follows:
data[2], data[3], data[4] = x, y, z
data[5], data[6], data[7] = l, m, n
data[8] = coat group number
data[9], data[10], data[11] = normal nx, ny, nz
data[12], data[13] = current and next index of refraction
data[14] = cosine of normal incidence angle
data[15] = wavelength in µm
data[20] = zero flag. Set this to 1.0 to indicate the DLL
computes the coating data, otherwise, ZEMAX will compute using
object settings.
for s polarization:
data[21] = amplitude reflection real
data[22] = amplitude reflection imaginary
data[23] = amplitude transmission real
data[24] = amplitude transmission imaginary
for p polarization:
data[31] = amplitude reflection real
data[32] = amplitude reflection imaginary
data[33] = amplitude transmission real
data[34] = amplitude transmission imaginary
[Mod note: moved to more appropriate forum for DLL-related discussions.]
Best answer by Csilla Timar-Fulep
View original