2 Replies Latest reply on Oct 29, 2013 7:56 AM by Mike Van Niekerk

    api open doc from EPDM environment with auto login

    Mike Van Niekerk

      Good day.

      Need some advice please... We are automating some tasks....
      I am opening a part (using Solidworks 2013 SP4 API openDoc6) from our EPDM environment and saving it in a differenct folder but same EPDM environment.
      I need to setup the script so that the EPDM system does not pop-up and request login credentials... basically I need to automated that part...

      The reason for the above is because we do not want to stop the process... it should run without user intervention. Any ideas?


        • Re: api open doc from EPDM environment with auto login
          Simon Turner

          If someone is already logged in on that machine, you don't need to login. You can check if someone is logged in. If not, you can login using a specific set of details like this:


          'This function logs in the Admin user on a vault if no one is logged in before from this machine
          Private Sub LogInAdminIfNotLoggedIn(ByVal vaultName As String, ByVal adminPassword As String)
            'Check if someone is logged in already
            Dim vault As IEdmVault11
            vault = New EdmVault5
            Dim userID As Integer
            userID = vault.GetLoggedInWindowsUserID(vaultName)
          If userID <> 0 Then Exit Sub 'Already logged in

            'Log in Admin
          vault.LogInWindowsUser("Admin", adminPassword, vaultName)
          End Sub

            • Re: api open doc from EPDM environment with auto login
              Mike Van Niekerk

              Firstly thank you for your quick response!!
              Secondly my apologies for the delay in my response!!


              Ok I have the above in place (Just C#).
              But here is my problem. The environment is a server and gets logged-off when not in-use by remote desktop.
              So basically there is nobody logged-in when the login occurs.


              When I create folders via the EPDM api (after above signin) the code works 100%

              When I open a solidwork assembly from the EPDM vault, the EPDM login pops up and requests login...

              Just before I open the solidworkds assembly, I again run the code above to login, but still the popup signin screen displays.


              Is there a different login to EPDM via the solidworkds API?

              Any ideas?



              Basically I need to open a solidworks document from Solidworks API from an EPDM location without the EPDM popup password request.


              Kind regards