hexagon logo

Set TOUCHSPEED from Visual Basic - Is it possible?

Hi All,

I have a VB6 program that references the pcdlrn.tlb (v4.2).

In my VB6 code I'm then able to open and execute a PC-DMIS part program.

Question is once I've opened my part program is it then possible to set the TOUCHSPEED before I execute it?

Kind Regards,
Chris
Parents
  • Hi vpt.se,
    TOUCHSPEED already exists in my part program - I just want to be able to modify the value berfore I execute it.
    I already do something similar to set other values in my part program, like this...

    Private WithEvents mobjCurrentPart As PCDLRN.PartProgram
    Dim pcdCommand As PCDLRN.Command
    Dim strID As String
    Dim lRAAngle As Long

    lRAAngle = 45

    For Each pcdCommand In mobjCurrentPart.Commands
    If pcdCommand.IsFlowControl = True Then
    strID = pcdCommand.GetText(DEST_EXPR, 0)
    Select Case strID
    Case "ANGLE"
    Call pcdCommand.PutText(QUOTES & lRAAngle & QUOTES, SRC_EXPR, 0)
    End Select
    Call pcdCommand.ReDraw
    End If
    Next pcdCommand


    Problem is TOUCHSPEED can't be set in the same way as it seems it's type is not FlowControl (i.e. pcdCommand.IsFlowControl).

    Any ideas?
Reply
  • Hi vpt.se,
    TOUCHSPEED already exists in my part program - I just want to be able to modify the value berfore I execute it.
    I already do something similar to set other values in my part program, like this...

    Private WithEvents mobjCurrentPart As PCDLRN.PartProgram
    Dim pcdCommand As PCDLRN.Command
    Dim strID As String
    Dim lRAAngle As Long

    lRAAngle = 45

    For Each pcdCommand In mobjCurrentPart.Commands
    If pcdCommand.IsFlowControl = True Then
    strID = pcdCommand.GetText(DEST_EXPR, 0)
    Select Case strID
    Case "ANGLE"
    Call pcdCommand.PutText(QUOTES & lRAAngle & QUOTES, SRC_EXPR, 0)
    End Select
    Call pcdCommand.ReDraw
    End If
    Next pcdCommand


    Problem is TOUCHSPEED can't be set in the same way as it seems it's type is not FlowControl (i.e. pcdCommand.IsFlowControl).

    Any ideas?
Children
No Data