CHAPTER 2 - MACROS AND VISUAL BASIC
LSM 880
VBA Programming for LSM
ZEISS
10/2014 V_01
000000-2071-464
31
4.7.2
Structure of a VBA-GUI command
There are three different kinds of actions that can be performed in the ZEN GUI: Setting a value (either a
number or a string, e.g. the frame size or configuration name), selecting from a list of options (e.g. the
scan mode), and executing a command (e.g. Snap). To reflect this, different kinds of commands are
available in the VBA-GUI interface.
All commands have a (Boolean, read-only) "IsEnabled" property that can be used to check whether the
command is supported by the current system configuration. Also, commands have a (Boolean, read/write)
"AsyncMode" property, that determines whether this command is executed asynchronously (i.e. program
flow continues without waiting for the command to finish) or synchronously. The default is synchronous
execution.
A command corresponding to a value in the GUI offers a "Value" property, which can be used to read or
write the corresponding value. For numeric values, the command also offers (read-only) "Minimum" and
"Maximum" properties.
A command corresponding to a range of options (i.e. a combo bvgbox or drop-down box) offers a
selection using the "ByIndex" or the "ByName" properties. A list of available options (as name strings)
can be queried from the "Items" property, and these name strings can be used in the "ByName"
property.
A command corresponding to a button (e.g. Snap) offers two methods: "CanExecute" can be used to
check whether the command can currently be executed, and "Execute" causes the specified action to
happen.
4.7.3
Recording a macro
When recording a macro, each click in the GUI is translated into a macro command in the editor. The
image below shows an example in which the following steps are recorded:
•
Set the frame size in X to 1024
•
Set the scan speed to 11 (values are rounded)
•
Take a Snap
•
Select the processing function "Average"
•
Select the currently active image as Input1
•
Enable averaging in X-direction
•
Set the averaging window in X-direction to a value of 385
•
Start the processing function
The recorded macro can then be edited and executed just like a hand-written VBA program.
Содержание LSM 880
Страница 1: ...LSM 880 LSM 880 NLO Operating Manual October 2014 ZEN 2 black edition...
Страница 650: ......
Страница 651: ...Confocal Laser Scanning Microscopy Stefan Wilhelm Carl Zeiss Microscopy GmbH Carl Zeiss Promenade 10 07745 Jena Germany...
Страница 678: ......
Страница 687: ......
Страница 688: ......