Home Image-Pro Automation (Macros, Apps, Reports)

PREMIER APP QUESTIONS - What is best way to RESTART AN APP? . . . What is best way to REMOVE AN APP?

All --

I have an PREMIER APP that has been created by and for IPP 9.1.

There is a convenient method / procedure for adding the APP to PREMIER consisting of

** Select the APPS RIBBON
** Press the OPEN PROJECT BUTTON to display the OPEN PROJECT DIALOG BOX
** Open to the appropriate IPP file

After doing some testing of this app with a customer, I'm wondering if there is a convenient method / procedure to do the following:

A) Restart an APP if it crashes
B) Remove an APP from PREMIER

Right now the only way that I know of to

A) Restart an APP if it crashes

is to:

A1) Select the AUTOMATE RIBBON
A2) Press the PROJECT WORKBENCH BUTTON to display the PROJECT WORKBENCH
A3) Press the RUN or LOAD button to restart the project
A4) Close the PROJECT WORKBENCH

And right now the only way that I know of to

B) Restart an APP if it crashes

is to:

B1) Select the AUTOMATE RIBBON
B2) Display the PROJECT WORKBENCH or PROJECT EXPLORER
B3) Locate the appropriate project within one of the PROJECT EXPLORER DIALOG BOXES
B4) Right click on the appropriate project
B5) Select REMOVE FROM PROJECT
B6) Close the PROJECT WORKBENCH or PROJECT EXPLORER

Is there a better method / procedure to accomplish these tasks?

Thanks.

-- Matt

Best Answer

  • Answer ✓
    Matt,

    This command is intended to work with Apps to start or close them but you are trying to use it on a regular module.

    Pierre

Answers

  • Matt,

    Here is the macro to reload an app.

        Public Function ReloadApp() As SimpleScript
            ReloadApp = New SimpleScript
    
            With Automate.ScriptingCommands.AppGadget(ReloadApp)
                .AppFile = "Project2\App1.vb"
                .Reload = True
                .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked
                .Run()
            End With
    
        End Function

    As for removing it entirely, you are right, it requires to remove the project which can be done in the Project Explorer either in the Workbench or in the Project Explorer panel.

    Pierre
  • Pierre --

    Thank you for your prompt response.

    I have tried to implement your suggested solution but have not succeeded.

    Attached are two projects that are my attempt to work out the interconnection between macros as suggested by your RELOADAPP.

    When I run
        Public Function ReloadApp() As SimpleScript

    within PROJECT 2 to reload MODULE 1 within PROJECT 1, I get the error shown in the attached JPG of a screen capture.

    My .VB and .IPP files are attached as TXT files because I did find a mechanism to upload them as VB, IPP, or ZIP files.

    Can you please show me where I've gone wrong.

    Thanks.

    -- Matt


  • Pierre --

    I think I see what you mean.

    Here is what generated this question.

    I had an APP on a customer's computer that attempted to apply a calibration that was not on that computer.

    When the error was encountered, the APP went OFFLINE.

    As was shown earlier, getting the APP back ONLINE is a multiple step process.

    I thought that your ReloadApp would be the equivalent of the LOAD button within PROJECT WORKBENCH and that it was to be run "against" the appropriate VB file.

    I'll work with this a bit more and see how your suggestion can be applied to my situation.

    Thanks.

    -- Matt

  • Matt,

    The line .AppFile = "Project2\App1.vb" needs to point to an App's module, in your example you made it point to some regular module and so it can't find the App itself (if there is one).

    Pierre
Sign In or Register to comment.