AnsweredAssumed Answered

PDM checkin error (24)

Question asked by Wesley Prins on Oct 19, 2016
Latest reply on Dec 9, 2016 by Andrew Johnson

Hello everybody,

 

I'm trying to create a new program for a automatic vault check in.

 

How ever i get the same error everytime and i don't know how to solve it.

 

Please find below my code, i will add the error and the action i already taken below the code

 

Dim swApp As SldWorks

        swApp = GetObject(, "sldworks.application")

        Dim swModel As ModelDoc2

        Dim swDraw As DrawingDoc

        Dim project As String = ""

        Dim Number As String = ""

        Dim Description As String = ""

        Dim note As String = ""

        Dim i_revOption As PDMWRevisionOptionType = 0

        Dim Revision As String = "A"

        Dim lifecycle As String = ""

        Dim RetainOwnership As Boolean = True

        Dim References As Object = Nothing

        Dim value As PDMWDocument

 

        swModel = swApp.ActiveDoc

        Dim filename As String = swModel.GetPathName

        project = SW_get_custom_properties("project")

        Number = SW_get_custom_properties("Number")

        Description = SW_get_custom_properties("Description")

        note = SW_get_custom_properties("note")

        Revision = SW_get_custom_properties("Revision")

        If string_is_nothing(Revision) = True Then

            Revision = "A"

        End If

        lifecycle = SW_get_custom_properties("lifecycle")

 

        Dim instance As IPDMWConnection

        instance = CreateObject("PDMWorks.PDMWConnection")

        instance.Login(mylogin,mypass, myserver")

        instance.Refresh()

        swApp.CloseDoc(filename)

 

        value = instance.CheckIn(filename, project, Number, Description, note, 1, Revision, lifecycle, RetainOwnership, References)

 

As error i get the text below:

 

There is no valid client license on this machine. (24)

 

i can checkin any file with solidworks manually without a problem

tried some solution on the net like

 

adding

C:\Program Files\Common Files\SolidWorks Shared;

to windows environnement variable

 

checked the vault licences

i have a solidworks professional licence.

 

Can anyone help me on a solution if there is one?

 

Thank you for your help

Outcomes