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
  • Dim pcd As PCDLRN.Application
    pcd = CreateObject("pcdlrn.application")
    Dim pcpart As PCDLRN.PartProgram
    pcpart = pcd.ActivePartProgram

    Dim cmds As PCDLRN.Commands
    cmds = pcpart.Commands

    Dim cmd As PCDLRN.Command
    For i As Integer = 1 To cmds.Count
    cmd = cmds.Item(i)
    If cmd.IsFlowControl Then
    If cmd.TypeDescription = "Assignment" And cmd.GetText(PCDLRN.ENUM_FIELD_TYPES.DEST_EXPR, 0) = "JOBNO" Then


    cmd.PutText("1234", PCDLRN.ENUM_FIELD_TYPES.SRC_EXPR, 0)


    End If
    End If


    Next
Reply
  • Dim pcd As PCDLRN.Application
    pcd = CreateObject("pcdlrn.application")
    Dim pcpart As PCDLRN.PartProgram
    pcpart = pcd.ActivePartProgram

    Dim cmds As PCDLRN.Commands
    cmds = pcpart.Commands

    Dim cmd As PCDLRN.Command
    For i As Integer = 1 To cmds.Count
    cmd = cmds.Item(i)
    If cmd.IsFlowControl Then
    If cmd.TypeDescription = "Assignment" And cmd.GetText(PCDLRN.ENUM_FIELD_TYPES.DEST_EXPR, 0) = "JOBNO" Then


    cmd.PutText("1234", PCDLRN.ENUM_FIELD_TYPES.SRC_EXPR, 0)


    End If
    End If


    Next
Children
No Data