> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example 16: User-Defined Operand (UDOC)

Ex 16: A user-defined operand (UDOC) is created which provides the total center thickness between 2 surfaces. Since a UDOC is an executable that needs to be called from OpticStudio, a UDOC can only be created by languages which can compile code (C#/C++). The source code is provided, but it needs to be compiled with the USER OPERAND solution rather than the standalone application solution. The EXE also needs to be named UDOC##.exe and placed in the ZOS-API\Operands folder.

```csharp theme={null}
Input:      None

Output:     UDOC01.exe
```

[C#](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2/page_ex16_cs.md)

[C++](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2/page_ex16_cpp.md)
