Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello there,
i am using creo 9.0 and vs professional 2022
I want to create a full asynchronous creo toolkit application on VS professional, but i dnt know how to start in a proper way. using some online materials i have managed to create something ,
1) any guide or start point to async creo application
2) How to pass RPC commands and where to find it ?
3) when i try to unlock using protk_unlock , i get toolkit for drawing license isnt available , but i dnt use any api regarding drawings ?
4) how to generate a pfc file and use that to get all the data of the cad part from the session?
sorry if all these are basic as i am new to it . i have learnt creo toolkit synchronous mode but not this
Solved! Go to Solution.
Hi
When you say create a full asynchronous toolkit application, do you mean that your application should start Creo ? or shall it catch a running Creo session?
by chance, can you confirm you have access to this article : https://www.ptc.com/en/support/article/CS355621
This is a reference article from our knowledge.
Hi
When you say create a full asynchronous toolkit application, do you mean that your application should start Creo ? or shall it catch a running Creo session?
by chance, can you confirm you have access to this article : https://www.ptc.com/en/support/article/CS355621
This is a reference article from our knowledge.
thanks for the reply @remy , yes i want to start creo using that application and pass RPC commands for feature creation , part creation..etc through the kernel to creo .
after starting creo in asynchronous mode using the exe file, in user guide they have mentioned about RPC command where can i learn about that?, i have succeeded in starting creo now.Thanks
After starting Creo or if you have established a connection, you can call any Creo API call without anything special. These are rpc, because you call them In Creo. The only thing you may need, is an event loop.
Regarding the lic issue: Take care if you copy or use PTC example codes, here you might have a link, or you link with different dlls, what I don’t believe.
@RPNThanks for the reply, Do you mean , after opening creo using Proengineerstart (), i have to create a event loop to listen , where i can pass the creo api toolkit commands like new part creation, feature creation in terminal , isnt it ? no need to pass proengineerconnect() isnt it?
what are these errors, i get in vs 2022, hard to understand these things ?
Can i generate a xml file of complete cad part using creotoolkit options (like it should contain all dimensions , parameters, ..etc)
Believe or not, but for the basic topic you can check all examples in the toolkit folder. And yes, you should compile the exe according this examples (This is regarding your screenshot). And if you start, you are connected, for full asynchronous you can configure a ribbon, which will call your asynchronous DLL callbacks. Just compile the examples, learning by doing. And in just plain DLL mode, RPC may not require for PTC, only function dispatching.
The first part of the documentation is also worth to read. You need a loop, and EventProcess to inform Creo that your app might do something. Without this it may slow or not responding. Regarding your last question, I think there are Toolkit Function to export and create a feature by xml, but toolkit is not Creo. It is just an environment to do most of the stuff what Creo can do (okay 40-60%). And rather to create a part feature by feature in xml, just copy an existing model and configure it in session. Else you may spend some minutes to create the relevant code 😉
It is a journey…
Hi @TP_9862373
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
ProEngineerStart() does not need ProEngineerConnect().
ProEngineerConnect() will try and connect to an existing session of Creo. while ProEngineerStart() will create it and connect directly. 7
Like recommended, instead of building your application from scratch, it is recommended to try an existing a project, have to work and iterate from there.