LSM 710 and LSM 780
MACROS AND VISUAL BASIC
Systems
VBA PROGRAMMING FOR LSM
Carl Zeiss
02/2010 M60-1-0025
e
45
5.2.2.4
Access to scanned pictures
Example:
Function ChannelIndexFromChannelName(ChannelName As String, ChannelIndex As Long)
Dim num As Long, num1 As Long, num2 As Long
Dim i As Long
Dim Success As Integer
Dim DetectionChannel As DsDetectionChannel
Dim LsmInfo As Lsm5Info
Dim Recording As DsRecording
ChannelIndexFromChannelName = False
Set Recording = Lsm5.DsRecording
Set LsmInfo = Lsm5.Info
If (LsmInfo.NumberOfPmtsInSystem(num, num1, num2) = True) Then
For i = 0 To (num + num1 - 1)
Set DetectionChannel = Recording.DetectionChannelOfActiveOrder(i, Success)
If Success Then
If (StrComp(DetectionChannel.Name, ChannelName) = 0) Then
ChannelIndex = i
ChannelIndexFromChannelName = True
GoTo exit_function
End If
End If
Next i
End If
exit_function:
Set LsmInfo = Nothing
Set Recording = Nothing
End Function