- Set customize ribbon (File>Options) to enable Developer tab in Excel
- Open VBA through Developer> Visual Basic
- It is required to load the ZOS-API assembly at the beginning. The macros can be checked from VBAProject> Modules
- Open the linked Excel file (with macro included), the Connect button and Surface Data button are linked to different macros.
- Click Interactive Extension, then the connect button. A message box will pop up and show the connected message.
7. Click Surface Data button, LDE and FDE data of the current active lens file will be extracted
8. Click any surface button from the generated surface button list, incident angles of rays on the target surface that tracing across the whole pupil from specific field will be retrieved and displayed on a newly opened sheet.
Find the files here on the Code Exchange here: ZPL Macro: Read optimization operand across pupil | Zemax Community