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
  •  Public Sub VarSet()
            [B]Dim PCDPart,Cmds,Cmd As Object
             PCDPart = PCDApp.ActivePartProgram
            Cmds = PCDPart.Commands[/B]
    
    
            For Each Cmd In [B][COLOR=#FF0000]Cmds
    [/COLOR][/B]           If [B]Cmd.Type[/B] = "Assignment" And Cmd.GetText(DEST_EXPR, 0) = "JOBNO" Then
                    retval = Cmd.PutText("1234", SRC_EXPR, 0)
                End If
            Next Cmd
    
            endForm()
        End Sub
    


    See what I bolded. I think it might of been overlooked.
Reply
  •  Public Sub VarSet()
            [B]Dim PCDPart,Cmds,Cmd As Object
             PCDPart = PCDApp.ActivePartProgram
            Cmds = PCDPart.Commands[/B]
    
    
            For Each Cmd In [B][COLOR=#FF0000]Cmds
    [/COLOR][/B]           If [B]Cmd.Type[/B] = "Assignment" And Cmd.GetText(DEST_EXPR, 0) = "JOBNO" Then
                    retval = Cmd.PutText("1234", SRC_EXPR, 0)
                End If
            Next Cmd
    
            endForm()
        End Sub
    


    See what I bolded. I think it might of been overlooked.
Children
No Data