7 Replies Latest reply on Sep 21, 2011 3:48 PM by Jim Sculley

    Standalone .NET vs Add-in...

    Christina Seay

      So far, all I've really worked on was stand-alone .NET applications that use the EPDM reference dll to perform actions in EPDM.

       

      I'm working on something right now where I want it to be easy for a user to kick-off my application from the vault from a specific file... I don't want the user to have to do a 'browse for file' inside the program.  I want to pick up the selected file in the vault and get the file information that way.  My problem so far is that this only seems to be possible using Add-ins launched from right-click menus, data card buttons, or toolbar buttons.

       

      So I guess my question is:  Is an add-in the only way to do it or can a stand-alone application tell what file the user has selected in the vault?

       

      If I use an add-in, is it true that a user has to reboot their machine to pick up changes I make to it?

        • Re: Standalone .NET vs Add-in...
          Wayne Matus

          You can use a dispatch script to launch your standalone programs including passing filenames as arguments to your exe. The one issue I have with running a dispatch script via a right mouse menu is that you have no control over who has access to that right mouse menu item.

           

          Users do not have to reboot, they can kill their explorer process using task manager and relaunch it.

            • Re: Standalone .NET vs Add-in...
              Christina Seay

              I like that idea better than using an add-in that forces users to reboot since we seem to always have to push applications that aren't quite tested and I'm frequently having to make changes to live programs.

               

              I know how to run tests on the file, to make sure it's in the right state and they have permission to execute the program on it, so that should negate the issue with a user having rights to the right-click menu item.  They could launch the program, but wouldn't get past the form loading.

               

              I think... and please correct me if I'm wrong... that doing it that ways means they could have multiple files selected... doesn't it?  I only need one file selected, so that could cause a problem if that's the case.

                • Re: Standalone .NET vs Add-in...
                  Michael Dekoning

                  Christina,

                   

                  In an add-in, you can limit the user to one file by using the EdmMenuFlags.EdmMenu_OnlySingleSelection parameter on IEdmCmdMgr5.AddCmd. Not sure if you can do that in Dispatch or not.

                  You say you don't like the idea of an add-in because code updates require users to reboot. How will you push updates to your application?

                   

                  Mike

                  EPDM 2011 SP2

                    • Re: Standalone .NET vs Add-in...
                      Christina Seay

                      Currently, we store the .exe on a network drive, and users run it from there.  I'm deploying ClickOnce applications that check for updates and download them to the users computer when they run the program again if a new version has been published out from Visual Studio.  It's a really painless way to handle updates.  I just publish and then instantly they have the new update when they run the program again.  And we don't use programs that they would need to keep open all day.  It's a use it once and close it kind of thing.  So it's very rare that anyone misses an update or is interrupted by one.

                    • Re: Standalone .NET vs Add-in...
                      Wayne Matus

                      Using dispatch, you can put your shell execute command to run inside a "For all documents" loop. If you do this it would launch your program for each file that user selects. If you do not have a "For all documents" loop in your dispatch and user selects more than one file, it only recognizes the last file selected. Not sure which file it recognizes if user selects a folder.

                       

                      In dispatch you can create a parameter file. It has been a while since I wrote one using this feature, but I think it could handle your issue of user selecting more than one file if you knew the logic as to which one of the files selected to run the program on.

                        • Re: Standalone .NET vs Add-in...
                          Christina Seay

                          I wonder if I can use dispatch to do a for all documents loop and just detect that more than one is selected.  With the application I'm running, running on more than one file would take forever for a user to process, so I need to limit them to just one at a time.

                           

                          I'll play with it and see what I can come up with.  Thank-you for the advice.

                    • Re: Standalone .NET vs Add-in...
                      Jim Sculley

                      I am pretty sure you do not have to reboot to see changes to an add-in.  The only requirement is that the explorer.exe process must be restarted.  Rebooting is one way to do this, but not the most elegant.

                       

                      I created a simple add-in (AddinReloader) that adds a right click menu item named 'Reload Add-Ins'.  It kills any running 'explorer.exe' processes and then creates a new explorer.exe instance.  I've tested it and it seems to work.

                       

                      The plan is to send users an email when a new version of one or more add-ins is installed in the vault.  They can then use the AddinReloader to get the latest code.  The only time users would need to reboot is when I make changes to the AddinReloader add-in itself, which will be rare, if at all.

                       

                      Jim S.