AnsweredAssumed Answered

PDM Works API Won't Connect: User Defined Type not Defined

Question asked by Matt Finley on Feb 14, 2011
Latest reply on Mar 2, 2011 by Matt Finley

I've looked through several topics on this subject and couldn't find any resolution. I'm trying to access the PDM vault

via VBA and failing at the very first line when trying to declare the connection:

 

User defined type not defined.

 

I read somehwere else that I needed to add a reference to a DLL that I could not find:

 

SolidWorks Workgroup PDM 1.0 Type Library

 

Here's the code I tried last, it is almost identical to the other one's I've tried.

Dim connection As PDMWConnection
Dim filename As String
Dim project As String
Dim Number As String
Dim Description As String
Dim note As String
Dim i_revOption As PDMWRevisionOptionType
Dim Revision As String
Dim lifecycle As String
Dim RetainOwnership As Boolean
Dim References As Object
Dim value As PDMWDocument

Sub main()
    On Error GoTo errorHandler
    Set connection = CreateObject("PDMWorks.PDMWConnection")
    connection.Login "xxx", "xxx", "xxx"


I have a PDM account. I have SW Office Premium 2008 SP5.0 on XP. I've tried both

before and after I've logged into the vault, though it would seem it should log in itself.

 

Am I just missing the DLL for the SolidWorks Workgroup PDM 1.0 Type Library or have I not included enough info?

 

Thanks in advance.

 

Matt

Outcomes