Skip to main content
1-Visitor
March 16, 2017
Question

When connecting to Creo through a VB.NET application, why am I getting an "xToolkit Busy" error?

  • March 16, 2017
  • 1 reply
  • 4757 views

Through the SmarTeam integration, my referenced VB.NET COM object attempts to connect to the existing Creo session but fails with an error depicting "xToolkit Busy":

XToolkitBusy.png

My code is as follows, and the error occurs at the first Connect() method:

Dim asynconn As New pfcls.CCpfcAsyncConnection

Dim conn As pfcls.IpfcAsyncConnection

Dim CreoSession As pfcls.IpfcBaseSession

conn = asynconn.Connect("", "", ".", 5)

conn = asynconn.GetActiveConnection()

CreoSession = conn.Session

'... Do stuff here

conn.Disconnect(2)

I have ensured the following:

  1. JRE component is installed for Creo
  2. System environment variable is set to PRO_COMM_MSG with path to the .exe file (includes whitespace)
  3. J8U40 (64 bit) is installed

I'm not sure what else to look for or how to troubleshoot this.  Any advice is appreciated.

1 reply

16-Pearl
March 16, 2017

Hello Sarah Nguyen

Remove this statement

conn = asynconn.GetActiveConnection()


Your coding trying to execute this statement before connecting to creo. That's why Toolkit is Busy.

and use


conn = asynconn.Connect("", "", ".", 5)

If conn IsNot Nothing Then

     CreoSession = conn.Session

End If

snguyen-21-VisitorAuthor
1-Visitor
March 16, 2017

Thank you, Parthiban!

I tried your suggestion but am still receiving the same error.  Any other ideas?

16-Pearl
March 16, 2017

Let me know for which statement, you getting the error

And try this

conn = asynconn.Connect(Nothing, Nothing , Nothing, 10)