Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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":
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:
I'm not sure what else to look for or how to troubleshoot this. Any advice is appreciated.
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
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)
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
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.
(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.
Do I need an additional license to use these toolkits or the VB API?