hexagon logo

VB.Net Automation of MovePoint Values

I can insert MovePoints using VB.Net with the Command Object as shown.

 

Dim PCDcommands As PCDLRN.Commands
Dim NewCMD As PCDLRN.Command

NewCMD = PCDcommands.Add(PCDLRN.OBTYPE.MOVE_POINT, True)

However, I cannot change the X,Y,Z values.

It's always MOVE/POINT,NORMAL,<0,0,0>

I've tried various version of the PutText method:

NewCMD.PutText("1.1", PCDLRN.ENUM_FIELD_TYPES.NOMINAL, 0)

The above does not work. 

Any ideas?

Thanks,

Mike

Parents
  • Easiest way to reverse engineer how to do something in PC-DMIS is to put the commands you wish to do in a program. Then go to File  --> Export --> Basic and open it in a text viewer to see how the syntax works

    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim DmisCommands As Object
    Dim DmisCommand As Object
    Set DmisApp = CreateObject("PCDLRN.Application")
    Set DmisPart = DmisApp.ActivePartProgram
    Set DmisCommands = DmisPart.Commands
    
    Set DmisCommand = DmisCommands.Add(MOVE_POINT, TRUE)
        DmisCommand.Marked = TRUE
      ' Set Learn Mode  = NORMAL
        retval = DmisCommand.SetToggleString (1, NORM_RELEARN, 0)
      ' Set Theoretical X  = 3
        retval = DmisCommand.PutText ("3", THEO_X, 0)
      ' Set Theoretical Y  = 5
        retval = DmisCommand.PutText ("5", THEO_Y, 0)
      ' Set Theoretical Z  = 8
        retval = DmisCommand.PutText ("8", THEO_Z, 0)

Reply
  • Easiest way to reverse engineer how to do something in PC-DMIS is to put the commands you wish to do in a program. Then go to File  --> Export --> Basic and open it in a text viewer to see how the syntax works

    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim DmisCommands As Object
    Dim DmisCommand As Object
    Set DmisApp = CreateObject("PCDLRN.Application")
    Set DmisPart = DmisApp.ActivePartProgram
    Set DmisCommands = DmisPart.Commands
    
    Set DmisCommand = DmisCommands.Add(MOVE_POINT, TRUE)
        DmisCommand.Marked = TRUE
      ' Set Learn Mode  = NORMAL
        retval = DmisCommand.SetToggleString (1, NORM_RELEARN, 0)
      ' Set Theoretical X  = 3
        retval = DmisCommand.PutText ("3", THEO_X, 0)
      ' Set Theoretical Y  = 5
        retval = DmisCommand.PutText ("5", THEO_Y, 0)
      ' Set Theoretical Z  = 8
        retval = DmisCommand.PutText ("8", THEO_Z, 0)

Children