AnsweredAssumed Answered

Run Windows Form App at Login

Question asked by Matthew aDAMS on Sep 9, 2015
Latest reply on Sep 10, 2015 by Simon Turner

I have written an add-in that display a Windows Form Application when the Add-in loads or using a menu command.  Works great but I did not know that the add-ins load more then just when you vault is first logged into.  I would like this to only run after you have logged in or when you select the menu command, not every time the add-in loads.  Can anyone point me in the right direction?

 

Here is the Code in VB that I am using:

 

Imports System.Windows.Forms

Imports EdmLib

Imports System.Collections.Generic

Imports System

 

Public Class UpdateCommon

    Implements IEdmAddIn5

 

    Public Sub GetAddInInfo(ByRef poInfo As EdmAddInInfo, poVault As IEdmVault5, poCmdMgr As IEdmCmdMgr5) Implements IEdmAddIn5.GetAddInInfo

 

        ' Specify add-in information

        poInfo.mbsAddInName = "Show Windows Form:"

        poInfo.mbsCompany = "Some Company."

        poInfo.mbsDescription = "Show Windows Form:

 

        ' Specify minimum version of SolidWorks Enterprise PDM

        poInfo.mlRequiredVersionMajor = 6

        poInfo.mlRequiredVersionMinor = 4

 

        Process.Start("D:\EPDM_Addins\test\CommonUpdate\App.exe")  'Display Windows Form at login

 

        ' Register a menu command

        poCmdMgr.AddCmd(1, "Run App", EdmMenuFlags.EdmMenu_Nothing)

 

    End Sub

 

    Public Sub OnCmd(ByRef poCmd As EdmCmd, ByRef ppoData As Array) Implements IEdmAddIn5.OnCmd

 

        Process.Start("D:\EPDM_Addins\test\CommonUpdate\App.exe")   'Display Windows Form from Menu

 

    End Sub

End Class

 

 

 

 

Thanks!

 

Matthew

Outcomes