Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Multithreading in Toolkit

frage29

New member
Hi all!

I start a
JLink-application with toolkit. In some situations I have to set the
JLink-Thread to the status "waiting". The consequence is, that ProE is
blocked. Is it possible to start the jlink-application in another
thread than the main toolkit thread?
My goal is that the waiting jlink-thread doesn
 
Can U please elaborate UR problem ...

You can start the JLink application in another thread .. But I am not sure about the behavior. Pro/E does discourage multi-threading in Pro/TK

However you can try and let us know :)
 
OK, I try. :)

I have a synchronous JLink application, that communicates with a Java-Swing application. The JLink part has to wait for the Swing part to receive data and to forward it to Toolkit.
When the JLink application is waiting, ProE is locked. You can
 
You first invoke the Swing application and from there U try to connect Pro/E thru the Async connection .. it should work ..
 
OK. So I establish an async connection to ProE and then I have to use the function <strong ="Strong">LoadProToolkitDll [/b]to get the dll-handle. And then I can execute a function in toolkit using <strong ="Strong">ExecuteFunction[/b]. Is that the way you propose?
 
Make sure the path is correct for the text directory and the dll ... In windows if U R hard-coding the path give "\\". Debug a little more and let me know.

dll_path = d:\\tmp\\tests_task.dll
text_path = "."
dll_handle = session.LoadProToolkitDll("SSSS", dll_path, text_path, True)
compare_result = getDll.ExecuteFunction("PTDllCompareOutputFiles", inp_arg)

One more thing U can verify in the Pro/TK code. create any file in user_initialize() of the Pro/TK function and test If the file is created or not ...
 

Sponsor

Back
Top