Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2023.2 Object Library
PCDLRN ActiveX DLL > PartProgram Object : StartMeshFromOptoCat Method
StartMeshFromOptoCat Method
Description
Starts Mesh from OptoCat
Syntax
Visual Basic
Public Function StartMeshFromOptoCat( _
   ByVal _port As Integer _
) As Boolean
Parameters
_port
Remarks

This provides the same functionality as the toolbar button described in the Laser help. For details, see the "Receive a Mesh from Opto-CAT" topic in the PC-DMIS Laser documentation.

Starts an OptoCat connection passing the integer port value of the connection. Returns True if successful.

Example
This is an automated approach to performing the manual method from the Mesh toolbar using the "Receive a Mesh from OptoCat" button described in the PC-DMIS Laser documentation.
Dim DmisApp As Object
Dim DmisPart As Object
Dim DmisCommands As Object
Dim DmisCommand As Object
Dim result As Boolean

Sub Part1
Set DmisApp = CreateObject("PCDLRN.Application")
Set DmisPart = DmisApp.ActivePartProgram
result = DmisPart.MeshOptoCatHasStarted

If result = True Then
MsgBox "It has started"
Else
MsgBox "It has NOT started "
End If

result = DmisPart.StartMeshFromOptoCat(5000)
If result = True Then
MsgBox "It has started good"
End If

result = DmisPart.MeshOptoCatHasStarted

If result = True Then
MsgBox "It has started verified"
Else
MsgBox "It has NOT started verified"
End If

DmisPart.StopMeshFromOptoCat
result = DmisPart.MeshOptoCatHasStarted

If result = True Then
MsgBox "It is still started"
Else
MsgBox "It has closed"
End If
End Sub

Sub Main
Part1
End Sub
See Also