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

Creating an Image-Pro Premier Add-in

This short tutorial explains how to create an add-in for Image-Pro Premier using Microsoft Visual Studio. An add-in is an extension to Image-Pro Premier, which has full access to the Premier automation APIs (Application Programming Interface) and commands and implements some custom User Interface providing additional functionality to the product. It is similar to an Image-Pro Premier App but is compiled, developed and debugged using one of the versions of Microsoft Visual Studio, the Microsoft Integrated Development Environment (IDE), instead of the Premier Project Workbench. A free version, called Visual Basic Express 2010, can be downloaded on the Microsoft website.

Installing Visual Studio
The first step required to configure a computer to enable the development of such add-ins is to make sure that you have access to a copy of Microsoft Visual Studio 2010, either the free one, or the professional version with support for the VB.NET language. 

Mapping the Image-Pro Premier Installation Folder
Once Visual Studio is installed, the next step is to create a X: logical drive to facilitate access to the Image-Pro premier installation directory and its dlls. This operation is performed in a DOS prompt, using the command subst to map the Premier installation folder (e.g. C:\Program Files\Media Cybernetics\Image-Pro Premier 9.1).

Installing the Add-in Template
After the X: drive is created, it is now time to download the attached ZIP file (Image-Pro Premier Add-in.zip) and save it to the Visual Studio Templates folder: My Documents\Visual Studio 2010\Templates\ProjectTemplates. Doing this, will allow us next, to use the Premier add-in template when creating a new project in Visual Studio.

Compiling the Project
Finally it's only a matter of compiling the resulting project, to create our first add-in. Note that you must have write access to the Image-Pro Premier application folder in order to compile successfully to that location which is the default output folder in this project. Once the project is successfully compiled to the X:\ folder, you can restart Image-Pro Premier and it should have a new Samples tab containing a "Sample Tool" button which when clicked will toggle the "Sample Tool" panel, displaying the name of the active document as an example.

At this point you have all the tools needed to build new Image Analysis features, as sophisticated as required, using the Image-Pro Premier commands and APIs, just like you would do with macros and Apps. Add-ins created using this approach will be compatible with all the variants of Image-Pro Premier, as well as the new Image-Pro Insight 9.1 as long as the APIs used are part of Insight.


  • Options
    edited September 2015
    The equivalent template for C# is now attached, the instructions are the same.
  • Options
    Note: The X:\ drive mentioned above needs to be defined for the user account used to run Visual Studio, so if you run it "As Administrator", X:\ needs to be defined in an administrator DOS prompt.
  • Options
    As Ip-Premier does not yet have a solution to incorporate microscope hardware like stages etc. ( ref.  Stage/Scope Pro in Ip-Pro) would it be an easy and the best task to do this using ad-ins ? And do you know if this has successfully been done?
  • Options
    This approach involves some development but yes it has been used successfully by other partners.
  • Options

    Rita --

    I have created a PREMIER APP which supports the PRIOR STAGE and FOCUS via the OPTISCAN and PROSCAN controllers.

    This APP is not as flexible as SCOPE-PRO / STAGE-PRO but it provides a solid foundation for anyone that would like to control the XYZ on a SCOPE via PRIOR HARDWARE from within PREMIER.  The APP also includes a DEMO APP that illustrates how to communicate with the XYZ APP and therefore how to communicate with the XYZ HARDWARE.

    Below is the TITLE PAGE from the DOCUMENTATION for this APP and a zoomed in view of the GRAPHIC that shows the UI.

    I hope this information is helpful

    -- Matt

  • Options
    Add-in is supported only by Visual Studio 2010? Or its also supported with Visual Studio 2012 and 2015?
  • Options
    Hi Joel,

    Current versions of Visual Studio, including VS 2015 are also supported. Just copy the template to the corresponded VS folder (e.g. C:\Users\<<USER>>\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual Basic)


  • Options
    Hi Yuri,

    Is there a demo add-in program which can be used for reference?

  • Options
    edited August 2017
    Hi Joel,

    We don't have Addin demos, but I just created an addin  in VB 2015 using the wizard (described above) and added one button "Apply Sobel filter" to the panel.

    You can download the attached project, compile it and then run (don't forget to map Premier folder as X drive, as explained above). Then you can run Image-Pro Premier.exe and will see "Samples" tab in the ribbon, which will have one button that will open a panel with "Apply Sobel filter" button.

    The same way you can create own addins using the wizard.

    There are many apps available as demo samples, you can use code from any of our apps in addins.


  • Options
    edited December 2022

    All --

    I have a project on my desk that I think would be appropriate to do with VB.NET outside of IP 10 or IP 11.

    Looking around, I see
    There seem to be several different versions of each available.

    QUESTIONS . . .
    1. Is the FREE VISUAL STUDIO COMMUNITY or one of the recent FREE VISUAL STUDIO EXPRESS packages an alternative to the PROJECT WORKBENCH?
    2. What version of VS has the blessing of the GURUs at MEDIA CY?
    3. Does the information above still apply regarding the connections between VB.NET from VISUAL STUDIO and IMAGE-PRO still apply?

    -- Matt

  • Options
    1. Yes, the Visual Studio Community edition can be an alternative to the Scripting Workbench in Image-Pro for individual developers (see https://visualstudio.microsoft.com/vs/compare/). The main differences are the tighter integration of the workbench, the ability to step through the interpreted code and the simplicity of app creation and deployment. Visual Studio is more difficult to use but provides more powerful tools.
    2. We recommand Visual Studio Professional, which can be used by any organization.
    3. Yes the information above is still applicable. Of course, the Visual Studio route is a bit more involved and there's some learning curve outside of Image-Pro before being able to deploy applications (called add-ins in that case).
  • Options

    Pierre --

    Thank you for the information.

    In the past, the IMAGING APPS that I built with VISUAL STUDIO ran in in WINDOWS and manipulated IPP-V7 through WINDOWS to control IPP-V7.

    Is this still an option or is it necessary to make the APP an IP-V10 ADD-IN an run the APP from within IP-V10?


    -- Matt

  • Options
    Both are possible but I would recommend the add-in which will give you the most control. 
  • Options

    Pierre --



    -- Matt

Sign In or Register to comment.