Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi Guys,
Currently I am connecting creo 2.0 using the below method-3 only.
But, now i try with connect method (1,2), if i try that method it shows error (pfcExceptions::XToolkitNotFound)
Dim asyncConnection As IpfcAsyncConnection
Dim cAC As CCpfcAsyncConnection
Dim session As IpfcBaseSession
Dim objccpfcconnection As New CCpfcAsyncConnection
Dim exePath, workDir
exePath = "C:\Program Files\PTC\Creo 2.0\Parametric\bin\parametric.exe"
workDir = "C:\Program Files\PTC\Creo 2.0\Common Files\F000\vbapi\vbapi_examples\models"
Try
'Method-1
_objIpfcConnection = objccpfcconnection.Connect(Nothing, Nothing, Nothing, Nothing) - pfcExceptions::XToolkitNotFound
session = asyncConnection.Session
session.LoadConfigFile("C:\Users\Public\Documents\config.pro")
'Method-2
'_objIpfcConnection = objccpfcconnection.Connect(DBNull.Value, DBNull.Value, DBNull.Value, DBNull.Value)-pfcExceptions::XToolkitNotFound
'session = asyncConnection.Session
'session.LoadConfigFile("C:\Users\Public\Documents\config.pro")
'Method-3
'cAC = New CCpfcAsyncConnection
'asyncConnection = cAC.Start(exePath + " -g:no_graphics-i:rpc_input", workDir)
'session = asyncConnection.Session
'session.LoadConfigFile("C:\Users\Public\Documents\config.pro")
Catch ex As Exception
MsgBox(ex.Message)
Finally
End Try
I configured creo 2.0 parametric as per guide instructions only.
Please help me where i done mistake.
Thanks
Balaji.S
Have you set system level Environment variables with short path?
Yes ,
I configured Environment variable PRO_COMM_MSG_EXE and i register vb_api_register.bat also.
Ensure that there is no user level variable with same name and system variable has dos path.
I will check and let you know the status
Hi Ketan,
Sorry
Belated wishes "Happy new year".
I was moved to another project. I think i will start my PTC Creo project on next week.
Once again sorry for Belated wishes.
Thnks
Balaji.S