Auto Part program close.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto Part program close.

    Hi All.

    Is it possible to auto close a part program once it has finished ? Do I need a script ?

    Thanks.

    Stuart.

  • #2
    In theory it is possible with a Basic script, but I have never tried it...

    Something like:

    Code:
    Sub Main()
    
      Dim DmisApp As Object
      Dim DmisPart As Object
    
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
    
      DmisPart.Close
    
    End Sub
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • vpt.se
      vpt.se commented
      Editing a comment
      Interesting if it should work or not, especially if the part program is the instance calling the script...
      ...but I guess it is the DmisApp that is the calling instance, so it will work?

      fatpants666 - chime in with the result, will ya'?

  • #3
    I will give it a try thanks.

    Comment


    • #4
      Did it work?
      sigpicV2014mr1

      Comment


      • #5
        I tried it right now, and it *didn't* work. It seems you can't saw off the branch you're sitting on... It can definitely be done with an external program that is controlling PC-DMIS, but I don't know if it can be done by an external program started *by* PC-DMIS...
        AndersI
        SW support - Hexagon Metrology Nordic AB

        Comment


        • DJAMS
          DJAMS commented
          Editing a comment
          Yes, PartProgram.Quit works when a .exe started by pc-dmis EXTERNALCOMMAND is run with NO_WAIT. Would assume close to work as well. I believe it also works with. bas script. Not 100% on this.

      Related Topics

      Collapse

      Working...
      X