hexagon logo

Automation, how to tell if Cancel was selected ?

Using Automation, is there a way of testing to see if the operator selected "Cancel" during the execution of the part program ?


Set App = CreateObject("PCDLRN.Application")
App.Visible = True
App.SetActive
Set Parts = App.PartPrograms
Set Part = Parts.Open("C:Test.PRG", "CMM1")
Part.EXECUTE

[COLOR="#FF0000"]How can I tell if Cancel was selected from the Dialog Window ?[/COLOR]

Part.Close
App.Quit


Thanks
Parents
  • Update:

    I may be going crazy, but I cannot get this code to work again. I swear it worked correctly once.
    Part.ExecutionWasCancelled always evaluates to False.
    Do I have to reset something in order for it to work again?

    Ok, I got it. The evaluation must come before the Part.Close
Reply
  • Update:

    I may be going crazy, but I cannot get this code to work again. I swear it worked correctly once.
    Part.ExecutionWasCancelled always evaluates to False.
    Do I have to reset something in order for it to work again?

    Ok, I got it. The evaluation must come before the Part.Close
Children
No Data