MACROS AND VISUAL BASIC
LSM 710 and LSM 780
Carl Zeiss
VBA PROGRAMMING FOR LSM
Systems
44 M60-1-0025
e
02/2010
5.2.2.3
Access to hidden Interface
- When do I need to use the hidden Interface?
- How do I find the desired Object / Method?
Open Tool / References
Browse CP.dll search, open
Choose Object Browser Project / Library DS or CP
Examine Object Structure
Example:
Function GetLaserKind(WaveLength As String, kind As Integer)
Dim count As Long
Dim CpObject As Object
Dim Lines As Object
Dim i As Long
Dim Success As Integer
Dim WaveLenghtOfIndex As Long
Dim Attenuation As Double
Dim Enable As Integer
Dim Name As String
GetLaserValueMax = False
Set CpObject = Lsm5.ExternalCpObject()
Set Lines = CpObject.pHardwareObjects.pLaserLines
count = Lines.lCount
For i = 0 To (count - 1)
Success = Lines.bLineInfo(i, WaveLenghtOfIndex, Attenuation, Enable, Name)
If (Success And (WaveLenghtOfIndex = WaveLenght)) Then
kind = Lines.AttenuatorType(WaveLenght)
Set Lines = Nothing
Set CpObject = Nothing
Exit Function
End If
Next i
Set Lines = Nothing
Set CpObject = Nothing
End Function