5 Replies Latest reply on Aug 25, 2016 1:16 PM by Julien Maulbault

    EPDM API Addin multi task

    Julien Maulbault

      I coded a c# addin for EPDM

      I would like have more than one task on my addin, Is it possible ?

      Could tell me the procedure or give any example ?

      Should I create two class that inherit from IEdmAddin5 ? But how to choose the good addin in administration tools, when creating task for exemple ?

      I'm in the dark....

        • Re: EPDM API Addin multi task
          Amen Allah Jlili

          More clarification on what you're trying to achieve, please! Are you trying to create multiple instances? What for exactly?
          Merci pour plus de clarification Monsieur!

          • Re: EPDM API Addin multi task
            Viktor Bovzdarenko

            Hi Julien,

            Just register more commands in you AddIn (with  IEdmCmdMgr5 AddCmd)  when you register it and assign different operations to each command. It means that you do not need to add another class which inherits from IEdmAddin5. Everything could be done in one class.

            Regards

            Viktor

            • Re: EPDM API Addin multi task
              Julien Maulbault

              Hi,

              thank you for your answers.

              I don't want to create new CMD, but I want to create new TASK, that can be run asynchrously by the server (as a task) not by the computer's user.

               

              I have on addin. This addin contains commands and just one task.

               

              public void GetAddInInfo(ref EdmAddInInfo poInfo, IEdmVault5 poVault, IEdmCmdMgr5 poCmdMgr)

                      {

                              //Metadata (skiped for the example)

                           

                              //Add command

                              poCmdMgr.AddCmd(blabla1);

                              poCmdMgr.AddCmd(blabla2);

                              ....

                              //Add hook

                              poCmdMgr.AddHook(EdmCmdType.EdmCmd_TaskRun);

                              poCmdMgr.AddHook(EdmCmdType.EdmCmd_TaskSetup);

                      }

               

              So to create task, I need to add a addHook. But I can only create on hook with EdmCmd_TaskRun, because I can't find a way switch between those task.

               

              In the administration Tools, when I create a Task then select the addin, I can just choose the addin not a specific Task in the Addin. So I suppose that It's just ons task (not command) in each Addin, right ?