hexagon logo

PC-DMIS 2012 MR1 & Scripting

Is VB scripting the only form of code to use for pc-dmis 2012 mr1?
Parents
  • I have already tried this but the same behavior.

    Here is my code.
    Dim App As Object
    Dim Parts As Object
    Dim Part As Object

    Set App = CreateObject("PCDLRN.Application")

    Set Parts = App.PartPrograms

    App.Visible = True

    Parts.Open "D:\PrbCal.PRG", "CMM1" '"Machine1/Maskin1".

    DoEvents
    Set Part = App.ActivePartProgram
    DoEvents
    MsgBox "Pause for 10 seconds here then click OK"

    Part.Execute
    DoEvents

    Part.Close

    Set Part = Nothing
    Set Parts = Nothing
    App.Quit
    Set App = Nothing



    Try this instead, Start PC-DMIS on-line, then open the program you are trying to work with, and execute it to make sure its on-line. Then leave it open, and try this sort of code -

    Dim Parts As Object
    Dim Part As Object

    Set App = CreateObject("PCDLRN.Application")

    Set Parts = App.PartPrograms

    App.Visible = True

    ' Parts.Open "D:\PrbCal.PRG", "CMM1" '"Machine1/Maskin1". *** NOTICE THAT THIS LINE IS COMMENTED OUT

    DoEvents
    Set Part = App.ActivePartProgram
    DoEvents


    Part.Execute
    DoEvents

    Part.Close

    Set Part = Nothing
    Set Parts = Nothing
    App.Quit
    Set App = Nothing


    Instead of trying to open the program, let it use the current program and see if that tells us anything.
Reply
  • I have already tried this but the same behavior.

    Here is my code.
    Dim App As Object
    Dim Parts As Object
    Dim Part As Object

    Set App = CreateObject("PCDLRN.Application")

    Set Parts = App.PartPrograms

    App.Visible = True

    Parts.Open "D:\PrbCal.PRG", "CMM1" '"Machine1/Maskin1".

    DoEvents
    Set Part = App.ActivePartProgram
    DoEvents
    MsgBox "Pause for 10 seconds here then click OK"

    Part.Execute
    DoEvents

    Part.Close

    Set Part = Nothing
    Set Parts = Nothing
    App.Quit
    Set App = Nothing



    Try this instead, Start PC-DMIS on-line, then open the program you are trying to work with, and execute it to make sure its on-line. Then leave it open, and try this sort of code -

    Dim Parts As Object
    Dim Part As Object

    Set App = CreateObject("PCDLRN.Application")

    Set Parts = App.PartPrograms

    App.Visible = True

    ' Parts.Open "D:\PrbCal.PRG", "CMM1" '"Machine1/Maskin1". *** NOTICE THAT THIS LINE IS COMMENTED OUT

    DoEvents
    Set Part = App.ActivePartProgram
    DoEvents


    Part.Execute
    DoEvents

    Part.Close

    Set Part = Nothing
    Set Parts = Nothing
    App.Quit
    Set App = Nothing


    Instead of trying to open the program, let it use the current program and see if that tells us anything.
Children
No Data