Structure Of A Vba-Gui Command; Recording A Macro - Zeiss LSM 880 Operating Manual

Table of Contents

Advertisement

LSM 880
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.
10/2014 V_01
CHAPTER 2 - MACROS AND VISUAL BASIC
VBA Programming for LSM
000000-2071-464
ZEISS
31

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lsm 880 nlo

Table of Contents