CHAPTER 2 - MACROS AND VISUAL BASIC
ZEISS
COM interface
ELYRA 7
14
000000-2262-999
03/2019 V_02
4
COM interface
The full range of ZEN VBA commands is also available via COM, by connecting a client program to a
running ZEN system. There are two COM-automation objects available, for the Lsm5Vba interface and for
the VBA-GUI interface. The COM object Lsm5Vba is called "Lsm5Vba.Application", and the one for the
VBA-GUI interface is called "Zeiss.Micro.AIM.ApplicationInterface".
For example to connect a MATLAB session to ZEN, start ZEN first, start MATLAB, and then type
>> ZENVBA = actxGetRunningServer('Lsm5Vba.Application')
>> ZEN = actxGetRunningServer('Zeiss.Micro.AIM.ApplicationInterface.ApplicationInterface')
To start a scan, two commands are now available
>> ZENVBA.Lsm5.StartScan
>> ZEN.GUI.Acquisition.Snap.Execute
5
Glossary
•
VBA: Visual Basic for Applications is an integrated programming environment that comes embedded
into ZEN. It allows to automate routine operations by recording macros, and to write application
programs that can use most features of the ZEN software.
•
Macro: A program written in the VBA environment is usually called a macro.
•
GUI: Graphical User Interface