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

Image Pro Premier Addin Visual Studio (Multiple Sample icons exhibited)

After following the instruction of specialist Pierre and YuriG https://forums.mediacy.com/discussion/comment/2679#Comment_2679
The sample tools is displayed and one button is displayed, however, every time the project operated, the sample icons added more, please provide the solution.


 By the way, are the errors shown in VS2022 critical. Thank you.

Best Answer

  • edited December 2021 Answer ✓
    The ribbon group is loaded by the addin file PremierAddIn2.Addin, please check that you have only 1 file in the Image-Pro folder (X:\).
    And another scannable location for these files is C:\Users\<<USER>>\Documents\Image-Pro 10\Addins, so check that folder too.

    Yuri

Answers

  • Hi Stanley,

    We have not tested VS 2022 yet, so you can try using versions of VS up to 2019. Though it looks like your addin was compiled and worked. 

    If you question is about the icon, then you can change it in the Ribbon file, "image" parameter, the example below uses star_32 image:

    <?xml version="1.0" encoding="utf-8" ?>
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" loadImage="GetImage">
      <commands namespace="PremierAddIn3">
        <!-- Declare a widget command to show or hide the sample panel. -->
        <command id="PremierAddIn3.SampleTool" label="Sample Tool3" image="star_32" class="SampleTool" enabled="true" panel="SamplePanel"/>
      </commands>
      <ribbon>
        <tabs>
          <!-- Declare a new Samples tab for the ribbon. -->
          <tab id="Samples" label="Samples" keytip="S">
            <!-- Declare a new group for this tab. -->
            <group label="Tools3">
              <!-- Create a button in the Tools group and link it to the command, CheckState=2 enables the toggle behavior. -->
              <button command="PremierAddIn3.SampleTool" commandParameter="CheckState='2'" checked="false" screentip="This is the description for Sample Tool."/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    So the addin button will look like this in the current virsion of Image-Pro 10.0.11:


    You can also run/debug your addin directly from Visual Studio if you set Start External Program to X:\Image-Pro.exe on the Debug page (you have to map Image-Pro folder (C:\Program Files\Media Cybernetics\Image-Pro 10) to X drive):



    I've also attached the project for this sampe.

    Yuri
  • Thanks YuriG for your quick response. Yes, I have referred to many setting articles in this forum from you and other specialists. There have no issues in setting. My question is that every time I run a new project, the sample tool will be added more, it looks like that they have been stored even though I deleted them from files as I hope to have the one that is operated, thank you.
  • How to remove the former, thank you.


  • Great! C and X addin delete. thanks Yuri
Sign In or Register to comment.