Skip to main content
1-Visitor
October 27, 2015
Question

Creo 2.0 Parametric connection error - VB.NET

  • October 27, 2015
  • 1 reply
  • 2365 views

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

1 reply

1-Visitor
October 27, 2015

Have you set system level Environment variables with short path?

1-Visitor
October 27, 2015

Yes ,

I configured Environment variable PRO_COMM_MSG_EXE  and i register vb_api_register.bat also.

1-Visitor
October 27, 2015

Ensure that there is no user level variable with same name and system variable has dos path.