Problem connecting VBA to Creo
Hello All,
I have been trying to run the following code as a Macro on Excel to get the name of current model open in Creo :
Sub Macro1()
Dim asynconn As New pfcls.CCpfcAsyncConnection
Dim conn As pfcls.IpfcAsyncConnection
Dim session As pfcls.IpfcBaseSession
Dim mdlname
Set conn = asynconn.Connect("", "", ".", 5)
Set session = conn.session
mdlname = session.CurrentModel.Filename
Range("A1").Select
ActiveCell.FormulaR1C1 = mdlname
MsgBox ("Name: " & mdlname)
conn.Disconnect (2)
End Sub
However, I get the following issue when entering the line of "Set conn = asynconn.Connect("", "", ".", 5)"
I have already added PRO_COMM_MSG_EXE to my system variables, run vb_api_register.bat adn added creo library to the references.
Does anybody know how can I fix this issue?
Thank you in advance

