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
  • you may have to call out an object to set the cmd.GetText to and enclose everything in parenthesis.
    You can also try to call out .type to the equivalent string name.

    [B]varname = "JOBNO"[/B]
    For Each Cmd In Cmds
            Set Cmd = Cmds.Item(cnt)
    If [B]((Cmd.Type = 195) And (varname = Cmd.GetText(DEST_EXPR, 0)))[/B] Then
                    retval = Cmd.PutText("1234", SRC_EXPR, 0)
                End If
            Next Cmd
    
    
Reply
  • you may have to call out an object to set the cmd.GetText to and enclose everything in parenthesis.
    You can also try to call out .type to the equivalent string name.

    [B]varname = "JOBNO"[/B]
    For Each Cmd In Cmds
            Set Cmd = Cmds.Item(cnt)
    If [B]((Cmd.Type = 195) And (varname = Cmd.GetText(DEST_EXPR, 0)))[/B] Then
                    retval = Cmd.PutText("1234", SRC_EXPR, 0)
                End If
            Next Cmd
    
    
Children
No Data