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

How to make a ROI in APPs?


i tried to make a simple APP for learning. Firstly, i want to drag a simple triangle command to APP panel. but i can't find this simple command through ROI commands on left list. How to build this simple command into APP and how the deliver the coordinate of the triangle i make to next command i want to build in the apps, for example “crop”.

By the way, is there any systematic guidance or video to teach how to build APP or macros?

Thank you very much


  • Hi Louis,

    You can find Image-Pro tutorials in our media library https://www.mediacy.com/support/imagepropremier/media
    App creation tutorial - https://youtu.be/jIRyvLxxWXM.

    The tutorial shows how to create an app by adding the commands from the toolbox. 
    It is also possible to use recorded macros in the app: activate macro recording,  go through the workflow, stop the macro recording and use the macro in your app. Any command can be made Interactive by activating the "Interactive" property of the command:

    Note, that you can use any of the pre-installed in Image-Pro apps or download any app from our app center as examples.

  • Hi Yuri,

    Thank you very much for your help. 

    I reviewed most of you recommend videos and tried to make some simple Apps. But still get quite confused on some areas.
    1. how to define variables and how to deliver them between different macros/events. for example, i simply dragged open image button to the panel. but it doesn't work when click. seems missing Dim doclist. is there any developer manual for beginners.
    2. how to attach buttons with macros? and when i recorded macro, i found those macro recorded are difficult to use directly for app develop, because those variable names are always changed. Those tools can drag into panel are also only work for activated image.

    i also download some apps for example. but it seems too difficult for me to read...
    Is there any way for me to get started?

    Thanks a lot 
  • Hi Louis,

    The buttons that are created by dragging the commands from the toolbox work with the active image, as you found out. The generated code uses ThisApplication.ActiveDocument, like this:

        Public Sub button1_Click(sender As Object, e As System.EventArgs) Handles button1.Click
            With Process.Filter.EdgeCommands.Sobel(Nothing)
                .Run(ThisApplication.ActiveDocument, Nothing)
            End With
        End Sub
    Open Image code looks like this:
        Public Sub button2_Click(sender As Object, e As System.EventArgs) Handles button2.Click
            With Application.DocumentCommands.Open(Nothing)
                .Filenames = Nothing
            End With
        End Sub
    The app designer can help you creating simple apps. Recorded macros will also generate you a script that does processing starting from the active image (or load image during the macro). Image-Pro has very broad functionality, so if you want to create complex apps, you may consider using lower level operators and functions (IQL Library). Remember that the macro language of Image-Pro is VB.NET, so you can use all VB.NET rules to create and pass variables, use standard functions or external libraries.

    You can use existing apps in our app library or apps posted on this forum as examples. If you will have some specific questions, please post them on the forum.


Sign In or Register to comment.