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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

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

snguyen-2
1-Newbie

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 8

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

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

Thank you, Parthiban!

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

Let me know for which statement, you getting the error

And try this

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

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

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?

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-component-in-creo-parametric/

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

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?"

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.

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

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

Top Tags