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

Can PREMIER 9.1.4 APP activate C:\ABC\123.TIF vs C:\XYZ\123.TIF if they are both open?

All --

I have an app that may have two images open from two image files but the files may have the same FILE NAME but be from different folders.

If I have both


open within PREMIER 9.1.4 then


will not necessarily activate the correct image.

There is good reason for these two images to have the same name and to be open at the same time so is there a way to ACTIVATE based on the FULL NAME and not based on the FILE NAME / DISPLAY NAME?


-- Matt

Best Answer

  • edited February 2015 Accepted Answer

    McImage.Name is a unique image identifier. It is based on file name, but if the image with the same name already exists, then the name will have a numerical suffix (2,3,...).
    Using file name activating window is not supported. The reason for that is that you may open the same image file multiple times, so you have multiple windows with the same file name.
    The proper way to handle image/window activation is to get pointer to McImage or IMcDocument when you open that image. (IMcDocument is returned by the Open command).



  • Matt,

    You can do it using a macro, loop on all images and compare image.File.FullPathName to the path you are looking for, then use ThisApplication.Windows(image.Name).Activate() when you have a match (even if the file is having the same name, image.Name will be different).

  • Pierre --

    Thank you for the additional information.

    I'm familiar with


    but not


    If I can compare my FULL FILE NAME with


    why couldn't I just call


    when I want to activate


    I've tried this and I get an error.

    Thanks again.

    -- Matt

  • Yuri --

    Thank you for your comments.

    I'll see if LEARNING and USING the IMCDOCUMENT works better than cycling through the OPEN IMAGES and querying whether their


    matches the one that I want.

    Thanks again.

    -- Matt

Sign In or Register to comment.