cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Level 1

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

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.

8 REPLIES

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

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

PK

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

Thank you, Parthiban!

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

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

Let me know for which statement, you getting the error

And try this

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

PK

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

I am getting the error on the .Connect() method.

I have also tried your suggestion and, unfortunately, am still receiving the same error.

Might it be related to my Java installation?

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

VB API not required java installation. Do you have registered your batch file & set your environment variables. If not see this link for preliminary steps

http://jkparthiban.com/index.php/2017/02/24/how-to-install-and-register-creo-vb-api-toolkit-componen...

PK

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

Great link!  Thanks, Parthiban.  I have gone through those steps and had noticed during the installation that for the "API Toolkits" all of them were checked for the specific machine I'm testing on.

Creo API Toolkits.png

(Note the screenshot above does not reflect the actual state, in which ALL of the toolkits are actually selected.)

Should I uncheck them all and use only the "Visual Basic API?"

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

You don't need to uncheck other stuffs they may be useful if you would like to code in C Programming or Java. But you have to select Visual Basic API to use Visual basic coding.

PK

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

Do I need an additional license to use these toolkits or the VB API?