hexagon logo

Minimize Report Window - Manual Vision Features

I run PC-DMIS in Protected Mode. Usually the report window is open. Is there a way to minimize the report window automatically with a script when the software kicks into a manual vision feature? I only have a few programs that do this.

It would be great to add a script before those features occur to automatically minimize the report window since that sits over the top of the vision and then once those features are done, I can have a script to open the report window back up.

Better yet, PC-DMIS should just do this automatically....Rolling eyes
Parents
  • Blatantly stolen from the online helpfile and edited:

    Sub Main(state as string)
    
    Dim App As Object
    Dim PartProg As Object
    Dim RepWin As Object
    Set App = CreateObject("Pcdlrn.Application")
    Set PartProg = App.ActivePartProgram
    Set RepWin = PartProg.ReportWindow
    
    if state = "show" then
    RepWin.Visible = True
    end if
    
    if state = "noshow" then
    RepWin.Visible = False
    end if
    
    if state = "" then
    if RepWin.Visible = true then
    RepWin.Visible = false
    elseif RepWin.Visible = false then
    RepWin.Visible = true
    end if
    
    End Sub
    


    Save it and call it from your program: "show" as argument should show the report window, "noshow" should close the report window. No argument "should" close it if open and open it if closed.


    So my variable with need to be labeled "state"?

    ASSIGN/STATE="show"
    $$ NO,
    SCRIPT HERE
    ASSIGN/STATE="noshow"
    $$ NO,
    SCRIPT HERE
    
Reply
  • Blatantly stolen from the online helpfile and edited:

    Sub Main(state as string)
    
    Dim App As Object
    Dim PartProg As Object
    Dim RepWin As Object
    Set App = CreateObject("Pcdlrn.Application")
    Set PartProg = App.ActivePartProgram
    Set RepWin = PartProg.ReportWindow
    
    if state = "show" then
    RepWin.Visible = True
    end if
    
    if state = "noshow" then
    RepWin.Visible = False
    end if
    
    if state = "" then
    if RepWin.Visible = true then
    RepWin.Visible = false
    elseif RepWin.Visible = false then
    RepWin.Visible = true
    end if
    
    End Sub
    


    Save it and call it from your program: "show" as argument should show the report window, "noshow" should close the report window. No argument "should" close it if open and open it if closed.


    So my variable with need to be labeled "state"?

    ASSIGN/STATE="show"
    $$ NO,
    SCRIPT HERE
    ASSIGN/STATE="noshow"
    $$ NO,
    SCRIPT HERE
    
Children
No Data