hexagon logo

Set A Variable in PC-DMIS with a textbox in VB.Net

Hi guys,

I have taken on the task of automating our CMM operations, and so far I have been able to push through some of my issues but I am stumped on this one. All I want to do is have the VB program output whatever is written in a textbox into a variable on PC-Dmis.

Thanks for the help.
Matt
Parents
  • Thanks vpt

    So I keep getting a Type Mismatch error. Here is the vb code
    Private Sub VarSet()
            Dim PCDPart As Object
            PCDPart = PCDApp.ActivePartProgram
            Dim JOBNO As Object
            JOBNO = PCDPart.GetVariableValue("JOBNO")
            Dim I As Object
            If Not JOBNO Is Nothing Then
                JOBNO.LongValue = TextBox3.Text
                PCDPart.SetVariableValue("JOBNO", JOBNO)
            Else
                MsgBox("Could Not Find JOBNO Variable")
            End If
    
            endForm()
        End Sub


    And here is what I am trying to set in PC-DMIS
    ASSIGN/JOBNO=0

    Thanks for the help guys.
Reply
  • Thanks vpt

    So I keep getting a Type Mismatch error. Here is the vb code
    Private Sub VarSet()
            Dim PCDPart As Object
            PCDPart = PCDApp.ActivePartProgram
            Dim JOBNO As Object
            JOBNO = PCDPart.GetVariableValue("JOBNO")
            Dim I As Object
            If Not JOBNO Is Nothing Then
                JOBNO.LongValue = TextBox3.Text
                PCDPart.SetVariableValue("JOBNO", JOBNO)
            Else
                MsgBox("Could Not Find JOBNO Variable")
            End If
    
            endForm()
        End Sub


    And here is what I am trying to set in PC-DMIS
    ASSIGN/JOBNO=0

    Thanks for the help guys.
Children
No Data