IOM Factory (VBA)

オフライン

I want to update part bom quantity based on the data in Excel
I registered the IOM.tdl in the VBA tool and wrote the following VBA code (based on the manual):

Dim f As New IomFactory 'must use the New keyword
Dim innov As Innovator
'Establish User Credentials
URL = "">localhost/.../InnovatorServer.aspx"
db = "API12"
user = "admin"
pw = "innovator"

Dim conn As HttpServerConnection
Set conn = f.CreateHttpServerConnection(URL, db,
user, pw) ' create a connection
Dim result As Item
Set result = conn.Login
If result.IsError Then
MsgBox result.getErrorString
Exit Sub
End If

However, I am encountering an error stating that CreateHttpServerConnection is not registered.

Does anyone have any suggestions on how to fix it?



* P.S. I also tried OData to try to get the part bom data, but the http result is 'no data found'

Parents Reply Children
  • オフライン in reply to Eli Donahue

    Thank you for your reply.
    I figured it out that I generated tlb file by C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe
    but the correct one is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe

    After I regenerated the tlb and added it as a VBA tool reference, it works well....