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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

asynchronous toolkit application

Ketan_Lalcheta
19-Tanzanite

asynchronous toolkit application

Hello I have created dll and exe (synchronous mode ONLY )of toolkit application. Can anyone let me know in which case one should go with asynchronous mode application. I am aware that asynchronous application allow toolkit and Creo (end user operations) execution simultaneously. Is this understanding correct? Additionally, real time example of need to develop asynchronous application would be of great help. Thanks in advance! Regards Ketan

7 REPLIES 7

Hi Chetan,

 

congrats on your start with toolkit.

 

if you look in the documentation you'll learn that (put it simply):

- exe is for asynchronous app: an application drives Creo

- dll is for synchronous app: the app is started within Creo (similarly as a plugin)

 

if you look in the Creo install you'll also find examples: <common files>\protoolkit\protk_appls\pt_examples

 

Ketan_Lalcheta
19-Tanzanite
(To:remy)

Could not find any example in folder fir asynchronous. Can you tell me name of file to be looked into? I am using Creo 3.0 M120

Hi ketan,

 

You may look into the folder <common files>\protoolkit\protk_appls\pt_async

you'll find c code there.

Ketan_Lalcheta
19-Tanzanite
(To:remy)

Thank you for this. I am able to get that file. Could you please let me know in which case asynchronous application is desirable? I have never used this mode. In fact, All my toolkit applications are synchronous only and never ever feel to have asynchronous ONLY. At max, mode less dialogue in synchronous application allows me to update Creo even though Toolkit GUI is running. So, I am looking for test case of asynchronous  mode where synchronous application can't solve purpose.

Asynchronous applications are mainly but not limited to batch process.

Anytime there is a need to drive Creo with no human interaction asynchronous is the way to go.

The application can starts or connect to Creo and provides an actual parallel processing

Ketan_Lalcheta
19-Tanzanite
(To:remy)

Appreciate your efforts to help me understand...

 

What does it mean by "provides an actual parallel processing"? Does it mean to have two different actions at same time through toolkit? If yes, how can both action work on same model open? Example is the key point I am looking for as I never felt need to develop asynchronous toolkit application.

I want to share  here some additional clarifications to the topic.

When possible - the best approach is to use a Toolki  dll. It is the fastest application mode.

The exe /spawn mode is also an synchronous mode but the application is executed secondary process and 3 or 4 time slower then dll mode and you have always a dos shell which should stay opened.

 

Synchronous mode means that all calls of the application are called synchronously- means: Creo Parametric process is busy until the program actions are executed and there is no possible to interact via UI or other application  until the synchronous application will give the focus back to Creo Parametric UI.

Also, specific for synchronous application is the execution of Mapkies. You have to load the mapkey containing many lines to the program stack in reverse order. They will remain there until the focus is back to UI /or ProMacroExecute is called – first then the mapkies will be executed.

 

The asynchronous mode (according to my experience) 30 -50 times slower comparing to dll mode.  So means when you have many different API calls you will notify a significant difference in the performance. This is one of the disadvantage.

The communication required the PRO_COMM_MSG_EXE and the creo Agent . You can connect at the same time more than one asynchronous application to a Creo session and they all could try to execute different APIs. As the name asynchronous say you cannot know and ensure which action is when executed first . When  an asynchronous application call a Toolkit API  Creo will execute it and will be immediately afterword’s ready for other UI actions or actions from coming from toolkit applications. (so means it will not wait for the current program action to finish)

Also in synchronous mode there is difference if you call a mapkey containing more than one line. Then the lines should be loaded in the correct order(ProMacroLoad) . They will be executed immediately after the loading

Top Tags