CHAPTER 2 - MACROS AND VISUAL BASIC
ZEISS
VBA Programming for LSM
LSM 880
28
000000-2071-464
10/2014 V_01
4.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
4.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
4.6
Programming with the Lsm5Vba interface
4.6.1
Lsm5Vba API structure
Use the object browser and the intellisense feature in the VBA editor to explore the Lsm5Vba API. Also,
some example macros are provided at the end of this chapter.
Summary of Contents for LSM 880
Page 1: ...LSM 880 LSM 880 NLO Operating Manual October 2014 ZEN 2 black edition...
Page 650: ......
Page 678: ......
Page 687: ......
Page 688: ......