    

 ## On this page

  

 

 # ZOSAPI.Common Namespace Reference

 Last update: 19.09.2025 

## <a id="nested-classes" name="nested-classes"></a>Classes

interface [ICoordinateTransform](interface_z_o_s_a_p_i_1_1_common_1_1_i_coordinate_transform.xhtml) interface [IMatrixData](interface_z_o_s_a_p_i_1_1_common_1_1_i_matrix_data.xhtml) Methods and properties for retrieving and/or setting a 2D array of double precision data. [More...](interface_z_o_s_a_p_i_1_1_common_1_1_i_matrix_data.xhtml#details)  
 interface [IMetadata](interface_z_o_s_a_p_i_1_1_common_1_1_i_metadata.xhtml) interface [ISettingsData](interface_z_o_s_a_p_i_1_1_common_1_1_i_settings_data.xhtml) Methods and interfaces for storing and retrieving user-defined settings.   
 All settings are referenced via a user-defined string key, and has a specific type associated with it (e.g. a single integer, array of doubles, etc.). [More...](interface_z_o_s_a_p_i_1_1_common_1_1_i_settings_data.xhtml#details)  
 interface [IVectorData](interface_z_o_s_a_p_i_1_1_common_1_1_i_vector_data.xhtml) Methods and properties for retrieving and/or setting a 1D array of double precision data. [More...](interface_z_o_s_a_p_i_1_1_common_1_1_i_vector_data.xhtml#details)  
 ## <a id="enum-members" name="enum-members"></a>Enumerations

enum [ZemaxColor](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89) {   
 [Default](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a7a1920d61156abc05a60135aefe8bc67), [Color1](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a10d80f0d320a1f0d44f4d5b81d2806bf), [Color2](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89ae2a7898b335d86cfce3647176ed64660), [Color3](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89aa768a1a754fe61345d8268ac9cbba90b),   
 [Color4](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89ae2e4e0d0046eb80c1a3a6a44085448a4), [Color5](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a6a13b6d8b42dd3580ddf94cd8adddc04), [Color6](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89ab5ab4d4d35fe76b5dce0d22ca018c784), [Color7](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a615211c915b857c848bb2523aebcb87b),   
 [Color8](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a7564c1632afb8a6aaca05e9bd5f93515), [Color9](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a2832ee537c7101260b3d5e20c0922c9e), [Color10](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89ab35c05431951c287d43b6e99dc4094ff), [Color11](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a5ca39723547d0bf4d5bdf297f4a8b5ef),   
 [Color12](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a236b2a160b1d7e13ea0301fdb2e4c705), [Color13](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a7e43937d34383a1fc77337a4b7a8ba36), [Color14](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a487886d364eef41a559632d8db73d116), [Color15](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89afdd652ed15bd62101b361b632185016e),   
 [Color16](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a6d29615d6bea6274f0991fd3748ad057), [Color17](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a958df9f8af09ea8893d5757a22898bed), [Color18](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a0621ae2fac8718fe568084b6ece99c36), [Color19](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a66214a22dfb1ade311a75beb3db34993),   
 [Color20](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a848bb011e14014088deaa18ee1e98c3b), [Color21](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a3bf709d431160b4e8ddb4c9780571e7b), [Color22](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89ab0cdf0d99e99d76aecf311b7db789b20), [Color23](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89adbef8b9213ec31d4044cbaf1f9663bb3),   
 [Color24](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89acfa2c86e5a10caaf8bf0d2cf7a853fbf), [NoColor](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89a745ff66e655ea022e59182e15f301c8c)  
 } enum [ZemaxOpacity](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcb) {   
 [P100](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba9e776ce9dbca3d1ccdcc42a288bf2d16), [P90](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba94d84f61c9b1ca10a7651203d685539a), [P80](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba148fb42c49bedf684e19dce8ff58a5f1), [P70](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba36ad4f3e5d60ba949427f719fe5256be),   
 [P60](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcbae14abdda2f1a04dd8828c73540a1ce09), [P50](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcbae0e09951f61fed537fba9bd4673c6673), [P40](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcbaf8fad38873381c3fe36228ceda07f8cf), [P30](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba09d6d0ff190eac94313f1dc0565780e5),   
 [P20](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba10d0da4c8a5f5ee1e90f05239ab78d03), [P10](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcbaa8c1f8495e10277718398939ece8a2ae), [P00](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcba21978e3f07166e693efbf87c4b5ee3a3)  
 } enum [SettingsDataType](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289) {   
 [None](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289a6adf97f83acf6453d4a6a4b1070f3754), [Integer](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289aa0faef0851b4294c06f2b94bb1cb2044), [Double](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289ad909d38d705ce75386dd86e611a82f5b), [Float](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289a22ae0e2b89e5e3d477f988cc36d3272b),   
 [String](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289a27118326006d3829667a400ad23d5d98), [Byte](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289aa245c3230debe5c956484ecc6fa93877), [Boolean](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289a27226c864bac7454a8504f8edb15d95b)  
 }## Enumeration Type Documentation

<a id="a3f54742c5ea7ea3449f67a65dea61289" name="a3f54742c5ea7ea3449f67a65dea61289"></a>## [◆ ](#a3f54742c5ea7ea3449f67a65dea61289)SettingsDataType

 enum [ZOSAPI.Common.SettingsDataType](namespace_z_o_s_a_p_i_1_1_common.xhtml#a3f54742c5ea7ea3449f67a65dea61289)

Enumerator<a id="a3f54742c5ea7ea3449f67a65dea61289a6adf97f83acf6453d4a6a4b1070f3754" name="a3f54742c5ea7ea3449f67a65dea61289a6adf97f83acf6453d4a6a4b1070f3754"></a>None <a id="a3f54742c5ea7ea3449f67a65dea61289aa0faef0851b4294c06f2b94bb1cb2044" name="a3f54742c5ea7ea3449f67a65dea61289aa0faef0851b4294c06f2b94bb1cb2044"></a>Integer <a id="a3f54742c5ea7ea3449f67a65dea61289ad909d38d705ce75386dd86e611a82f5b" name="a3f54742c5ea7ea3449f67a65dea61289ad909d38d705ce75386dd86e611a82f5b"></a>Double <a id="a3f54742c5ea7ea3449f67a65dea61289a22ae0e2b89e5e3d477f988cc36d3272b" name="a3f54742c5ea7ea3449f67a65dea61289a22ae0e2b89e5e3d477f988cc36d3272b"></a>Float <a id="a3f54742c5ea7ea3449f67a65dea61289a27118326006d3829667a400ad23d5d98" name="a3f54742c5ea7ea3449f67a65dea61289a27118326006d3829667a400ad23d5d98"></a>String <a id="a3f54742c5ea7ea3449f67a65dea61289aa245c3230debe5c956484ecc6fa93877" name="a3f54742c5ea7ea3449f67a65dea61289aa245c3230debe5c956484ecc6fa93877"></a>Byte <a id="a3f54742c5ea7ea3449f67a65dea61289a27226c864bac7454a8504f8edb15d95b" name="a3f54742c5ea7ea3449f67a65dea61289a27226c864bac7454a8504f8edb15d95b"></a>Boolean 



<a id="aa74995b87d76e49d5d756895353aad89" name="aa74995b87d76e49d5d756895353aad89"></a>## [◆ ](#aa74995b87d76e49d5d756895353aad89)ZemaxColor

 enum [ZOSAPI.Common.ZemaxColor](namespace_z_o_s_a_p_i_1_1_common.xhtml#aa74995b87d76e49d5d756895353aad89)

Enumerator<a id="aa74995b87d76e49d5d756895353aad89a7a1920d61156abc05a60135aefe8bc67" name="aa74995b87d76e49d5d756895353aad89a7a1920d61156abc05a60135aefe8bc67"></a>Default <a id="aa74995b87d76e49d5d756895353aad89a10d80f0d320a1f0d44f4d5b81d2806bf" name="aa74995b87d76e49d5d756895353aad89a10d80f0d320a1f0d44f4d5b81d2806bf"></a>Color1 <a id="aa74995b87d76e49d5d756895353aad89ae2a7898b335d86cfce3647176ed64660" name="aa74995b87d76e49d5d756895353aad89ae2a7898b335d86cfce3647176ed64660"></a>Color2 <a id="aa74995b87d76e49d5d756895353aad89aa768a1a754fe61345d8268ac9cbba90b" name="aa74995b87d76e49d5d756895353aad89aa768a1a754fe61345d8268ac9cbba90b"></a>Color3 <a id="aa74995b87d76e49d5d756895353aad89ae2e4e0d0046eb80c1a3a6a44085448a4" name="aa74995b87d76e49d5d756895353aad89ae2e4e0d0046eb80c1a3a6a44085448a4"></a>Color4 <a id="aa74995b87d76e49d5d756895353aad89a6a13b6d8b42dd3580ddf94cd8adddc04" name="aa74995b87d76e49d5d756895353aad89a6a13b6d8b42dd3580ddf94cd8adddc04"></a>Color5 <a id="aa74995b87d76e49d5d756895353aad89ab5ab4d4d35fe76b5dce0d22ca018c784" name="aa74995b87d76e49d5d756895353aad89ab5ab4d4d35fe76b5dce0d22ca018c784"></a>Color6 <a id="aa74995b87d76e49d5d756895353aad89a615211c915b857c848bb2523aebcb87b" name="aa74995b87d76e49d5d756895353aad89a615211c915b857c848bb2523aebcb87b"></a>Color7 <a id="aa74995b87d76e49d5d756895353aad89a7564c1632afb8a6aaca05e9bd5f93515" name="aa74995b87d76e49d5d756895353aad89a7564c1632afb8a6aaca05e9bd5f93515"></a>Color8 <a id="aa74995b87d76e49d5d756895353aad89a2832ee537c7101260b3d5e20c0922c9e" name="aa74995b87d76e49d5d756895353aad89a2832ee537c7101260b3d5e20c0922c9e"></a>Color9 <a id="aa74995b87d76e49d5d756895353aad89ab35c05431951c287d43b6e99dc4094ff" name="aa74995b87d76e49d5d756895353aad89ab35c05431951c287d43b6e99dc4094ff"></a>Color10 <a id="aa74995b87d76e49d5d756895353aad89a5ca39723547d0bf4d5bdf297f4a8b5ef" name="aa74995b87d76e49d5d756895353aad89a5ca39723547d0bf4d5bdf297f4a8b5ef"></a>Color11 <a id="aa74995b87d76e49d5d756895353aad89a236b2a160b1d7e13ea0301fdb2e4c705" name="aa74995b87d76e49d5d756895353aad89a236b2a160b1d7e13ea0301fdb2e4c705"></a>Color12 <a id="aa74995b87d76e49d5d756895353aad89a7e43937d34383a1fc77337a4b7a8ba36" name="aa74995b87d76e49d5d756895353aad89a7e43937d34383a1fc77337a4b7a8ba36"></a>Color13 <a id="aa74995b87d76e49d5d756895353aad89a487886d364eef41a559632d8db73d116" name="aa74995b87d76e49d5d756895353aad89a487886d364eef41a559632d8db73d116"></a>Color14 <a id="aa74995b87d76e49d5d756895353aad89afdd652ed15bd62101b361b632185016e" name="aa74995b87d76e49d5d756895353aad89afdd652ed15bd62101b361b632185016e"></a>Color15 <a id="aa74995b87d76e49d5d756895353aad89a6d29615d6bea6274f0991fd3748ad057" name="aa74995b87d76e49d5d756895353aad89a6d29615d6bea6274f0991fd3748ad057"></a>Color16 <a id="aa74995b87d76e49d5d756895353aad89a958df9f8af09ea8893d5757a22898bed" name="aa74995b87d76e49d5d756895353aad89a958df9f8af09ea8893d5757a22898bed"></a>Color17 <a id="aa74995b87d76e49d5d756895353aad89a0621ae2fac8718fe568084b6ece99c36" name="aa74995b87d76e49d5d756895353aad89a0621ae2fac8718fe568084b6ece99c36"></a>Color18 <a id="aa74995b87d76e49d5d756895353aad89a66214a22dfb1ade311a75beb3db34993" name="aa74995b87d76e49d5d756895353aad89a66214a22dfb1ade311a75beb3db34993"></a>Color19 <a id="aa74995b87d76e49d5d756895353aad89a848bb011e14014088deaa18ee1e98c3b" name="aa74995b87d76e49d5d756895353aad89a848bb011e14014088deaa18ee1e98c3b"></a>Color20 <a id="aa74995b87d76e49d5d756895353aad89a3bf709d431160b4e8ddb4c9780571e7b" name="aa74995b87d76e49d5d756895353aad89a3bf709d431160b4e8ddb4c9780571e7b"></a>Color21 <a id="aa74995b87d76e49d5d756895353aad89ab0cdf0d99e99d76aecf311b7db789b20" name="aa74995b87d76e49d5d756895353aad89ab0cdf0d99e99d76aecf311b7db789b20"></a>Color22 <a id="aa74995b87d76e49d5d756895353aad89adbef8b9213ec31d4044cbaf1f9663bb3" name="aa74995b87d76e49d5d756895353aad89adbef8b9213ec31d4044cbaf1f9663bb3"></a>Color23 <a id="aa74995b87d76e49d5d756895353aad89acfa2c86e5a10caaf8bf0d2cf7a853fbf" name="aa74995b87d76e49d5d756895353aad89acfa2c86e5a10caaf8bf0d2cf7a853fbf"></a>Color24 <a id="aa74995b87d76e49d5d756895353aad89a745ff66e655ea022e59182e15f301c8c" name="aa74995b87d76e49d5d756895353aad89a745ff66e655ea022e59182e15f301c8c"></a>NoColor 



<a id="a0071f2287ecefd1f9c2486f0f36d0bcb" name="a0071f2287ecefd1f9c2486f0f36d0bcb"></a>## [◆ ](#a0071f2287ecefd1f9c2486f0f36d0bcb)ZemaxOpacity

 enum [ZOSAPI.Common.ZemaxOpacity](namespace_z_o_s_a_p_i_1_1_common.xhtml#a0071f2287ecefd1f9c2486f0f36d0bcb)

Usage (see [Example 17](page_ex17.xhtml) for a full sample)

C#

 //Rectangular Volume

 //Scattering properties

 //Draw:opacity set to 50%

 IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings([ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).[NCE](namespace_z_o_s_a_p_i_1_1_editors_1_1_n_c_e.xhtml).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](namespace_z_o_s_a_p_i.xhtml).[Common](namespace_z_o_s_a_p_i_1_1_common.xhtml).ZemaxOpacity.P50;

[ZOSAPI.Common](namespace_z_o_s_a_p_i_1_1_common.xhtml)

**Definition:** InterfacesCommon.cs:9



[ZOSAPI.Editors.NCE](namespace_z_o_s_a_p_i_1_1_editors_1_1_n_c_e.xhtml)

**Definition:** InterfacesNCE.cs:19



[ZOSAPI.Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml)

**Definition:** InterfacesEditors.cs:12



[ZOSAPI](namespace_z_o_s_a_p_i.xhtml)

The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...

**Definition:** IAS_FieldCurvatureAndDistortion.cs:5





 C++

 //Rectangular Volume

 //Scattering properties

 //Draw:opacity set to 50%

 IObjectTypeSettingsPtr oType_2 = Object_2-&gt;GetObjectTypeSettings(ObjectType_RectangularVolume);

 Object_2-&gt;ChangeType(oType_2);

 Object_2-&gt;ZPosition = 2;

 Object_2-&gt;Material = "N-BK7";

 IObjectRectangularVolumePtr RectVolume2_data = Object_2-&gt;ObjectData;

 RectVolume2_data-&gt;X1HalfWidth = 12;

 RectVolume2_data-&gt;Y1HalfWidth = 12;

 RectVolume2_data-&gt;ZLength = 40;

 RectVolume2_data-&gt;X2HalfWidth = 12;

 RectVolume2_data-&gt;Y2HalfWidth = 12;

 INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2-&gt;VolumePhysicsData;

 RectVolume2_volphysdata-&gt;Model = VolumePhysicsModelType_AngleScattering;

 RectVolume2_volphysdata-&gt;ModelSettings-&gt;_S_AngleScattering-&gt;MeanPath = 5;

 RectVolume2_volphysdata-&gt;ModelSettings-&gt;_S_AngleScattering-&gt;Angle = 30;

 INCEDrawDataPtr RectVolume2_Drawdata = Object_2-&gt;DrawData;

 RectVolume2_Drawdata-&gt;Opacity = ZemaxOpacity_P50;



 Matlab

 % Rectangular Volume

 % Scattering Properties

 % Draw:opacity set to 50%

 oType_2 = Object_2.GetObjectTypeSettings([ZOSAPI](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).[NCE](namespace_z_o_s_a_p_i_1_1_editors_1_1_n_c_e.xhtml).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](namespace_z_o_s_a_p_i.xhtml).[Editors](namespace_z_o_s_a_p_i_1_1_editors.xhtml).[NCE](namespace_z_o_s_a_p_i_1_1_editors_1_1_n_c_e.xhtml).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](namespace_z_o_s_a_p_i.xhtml).[Common](namespace_z_o_s_a_p_i_1_1_common.xhtml).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



 Enumerator<a id="a0071f2287ecefd1f9c2486f0f36d0bcba9e776ce9dbca3d1ccdcc42a288bf2d16" name="a0071f2287ecefd1f9c2486f0f36d0bcba9e776ce9dbca3d1ccdcc42a288bf2d16"></a>P100 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba94d84f61c9b1ca10a7651203d685539a" name="a0071f2287ecefd1f9c2486f0f36d0bcba94d84f61c9b1ca10a7651203d685539a"></a>P90 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba148fb42c49bedf684e19dce8ff58a5f1" name="a0071f2287ecefd1f9c2486f0f36d0bcba148fb42c49bedf684e19dce8ff58a5f1"></a>P80 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba36ad4f3e5d60ba949427f719fe5256be" name="a0071f2287ecefd1f9c2486f0f36d0bcba36ad4f3e5d60ba949427f719fe5256be"></a>P70 <a id="a0071f2287ecefd1f9c2486f0f36d0bcbae14abdda2f1a04dd8828c73540a1ce09" name="a0071f2287ecefd1f9c2486f0f36d0bcbae14abdda2f1a04dd8828c73540a1ce09"></a>P60 <a id="a0071f2287ecefd1f9c2486f0f36d0bcbae0e09951f61fed537fba9bd4673c6673" name="a0071f2287ecefd1f9c2486f0f36d0bcbae0e09951f61fed537fba9bd4673c6673"></a>P50 <a id="a0071f2287ecefd1f9c2486f0f36d0bcbaf8fad38873381c3fe36228ceda07f8cf" name="a0071f2287ecefd1f9c2486f0f36d0bcbaf8fad38873381c3fe36228ceda07f8cf"></a>P40 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba09d6d0ff190eac94313f1dc0565780e5" name="a0071f2287ecefd1f9c2486f0f36d0bcba09d6d0ff190eac94313f1dc0565780e5"></a>P30 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba10d0da4c8a5f5ee1e90f05239ab78d03" name="a0071f2287ecefd1f9c2486f0f36d0bcba10d0da4c8a5f5ee1e90f05239ab78d03"></a>P20 <a id="a0071f2287ecefd1f9c2486f0f36d0bcbaa8c1f8495e10277718398939ece8a2ae" name="a0071f2287ecefd1f9c2486f0f36d0bcbaa8c1f8495e10277718398939ece8a2ae"></a>P10 <a id="a0071f2287ecefd1f9c2486f0f36d0bcba21978e3f07166e693efbf87c4b5ee3a3" name="a0071f2287ecefd1f9c2486f0f36d0bcba21978e3f07166e693efbf87c4b5ee3a3"></a>P00