3 Replies Latest reply on Feb 19, 2013 10:23 AM by Rich Strazdas

    Why are multiple add-ins invoked from a data card button?

    Rich Strazdas

      I have two add-ins invoked from two different buttons in a data card.

      Either button invoked both add-ins. What's going on?


      Each button has

           Command type: Run Add-in

           Name of add-in: addin1 or addin2 (not both, of course)


      I've learned to distinguish between the calling buttons as follows


           void EdmLib.IEdmAddIn5.OnCmd(ref EdmCmd poCmd, ref System.Array ppoData)


                switch (poCmd.meCmdType)


                     case EdmCmdType.EdmCmd_CardButton:

                          if (!poCmd.mbsComment.StartsWith("addin1"))     // is this the button we expect to invoke us?

                               break;     // not our button


                          // do stuff for our button





      Even though I check the intended add-in name with all my add-ins, I sometimes see both add-ins execute. This behaviour comes and goes, persisting for hours(?) before changing. Is there some way that a previous version of the add-in (before checking for the intended name) could get reinstalled or otherwise invoked by mistake? There is a second administrator who sees the same behavior. He can change button properties, but has no means to replace an add-in.


      And why do all add-ins get invoked?

      When I use PDM Administration for New Add-in, I select both Interop.EdmLib.dll and addin1.dll (or addin2.dll). Is this part of my problem?


      Thanks for any suggestions.