Bug in PdmWorks 4.0 with API

'If you place a document that contains the character "Ø" in PdmWorks 4, '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? - 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:
formatting link
***
Reply to
swPeter
Loading thread data ...

'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:
formatting link
***
Reply to
swPeter

'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:
formatting link
***
Reply to
swPeter

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.