Bug in PdmWorks 4.0 with API

Discussion in 'SolidWorks' started by swPeter, Jul 21, 2005.

  1. swPeter

    swPeter Guest

    'If you place a document that contains the character "Ø" in PdmWorks
    4.0, and you use API,
    'PdmWorks 4.0 return that the document does not exist.

    Option Explicit

    Sub main()

    Dim connection As Object 'PDMWConnection
    Dim PdmWdc As Object ' PDMWDocument
    Dim NameDocInPdmW As String
    Dim alldocs As Object ' PDMWDocuments
    Dim adoc As Object ' PDMWDocument

    '****************************************************
    NameDocInPdmW = "Ø.SLDPRT" 'It exists in VaultData of PdmWorks 4.0
    '****************************************************

    Set connection = CreateObject("PDMWorks.PDMWConnection")

    If Not connection Is Nothing Then
    connection.Login "pdmwadmin", "pdmwadmin", "localhost"

    'Not show the documents that contain the character "Ø".
    Set alldocs = connection.Documents
    If Not alldocs Is Nothing Then
    For Each adoc In alldocs
    Debug.Print adoc.Name
    Next
    End If
    Set alldocs = Nothing

    ' Other Error with "GetSpecificDocument"
    Set PdmWdc = connection.GetSpecificDocument(NameDocInPdmW)

    If PdmWdc Is Nothing Then
    If Err.Number <> 0 Then
    MsgBox Err.Number & " - " & Err.Description 'Not show Error
    Err.Clear
    On Error GoTo 0
    End If
    MsgBox NameDocInPdmW & " Not in VaultData of PDMWorks 4.0 .??? - This
    is an error"
    End If

    connection.Logout
    Set connection = Nothing

    End If

    End Sub


    ----------swPeter : Especialista autónomo en automatización de SolidWorks.

    *** Sent From/Enviado desde: http://groups.expo.st ***
     
    swPeter, Jul 21, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.