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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

JLink accessing proE main thread

diesunddas2
1-Newbie

JLink accessing proE main thread

Hi guys,

What I am trying to achieve is a full functional proE window AND a full functional JFrame out of which it is possible to do operations on the current proE model. For instance read all parts of the current assembly, display them as a List, select a part in this list and highlight this part within the proE window.

All pieces themselves I got running in an synchronous app, but obly separetly.

in the documentation it says not to use anything like JWindow etc as it creates new threads and that's not fine with the main thread of proE.

Anyway, I gave it a shot and tried to use a JFrame with JButtons and ActionListeners for instance to read all parts from an assembly. The result was, it doesn't work, no surprise...

So my question is, is there a way to inject a job into the proE main thread? (something like in swing: SwingUtilities.invokeLater(..)).

Or do I need to create a async jlink application for my needs? I already tried to set one up, got the pfcAsyncFullExample.java example running but not my own one.

Would appreciate any help,

best regards


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2

Hell Paul

If you to use a GUI interface that you create then you will need to set the GUI model to true (this.setModal(true)). I would use a JTable in the GUI if you want a user to select a part from a list. But It is easier to let the user select the component from the Pro/E window then have JLink execute on the selection. Also you will need to use the selections methods in JLink. The trick for the GUI is set the Modal to true.

In Reply to Paul Benoe:

Hi guys,

What I am trying to achieve is a full functional proE window AND a full functional JFrame out of which it is possible to do operations on the current proE model. For instance read all parts of the current assembly, display them as a List, select a part in this list and highlight this part within the proE window.

All pieces themselves I got running in an synchronous app, but obly separetly.

in the documentation it says not to use anything like JWindow etc as it creates new threads and that's not fine with the main thread of proE.

Anyway, I gave it a shot and tried to use a JFrame with JButtons and ActionListeners for instance to read all parts from an assembly. The result was, it doesn't work, no surprise...

So my question is, is there a way to inject a job into the proE main thread? (something like in swing: SwingUtilities.invokeLater(..)).

Or do I need to create a async jlink application for my needs? I already tried to set one up, got the pfcAsyncFullExample.java example running but not my own one.

Would appreciate any help,

best regards

Hi,

setModal is only possible for Dialogs and blocks the proE session as long as the dialog is active - what's actually the use of dialog and the reason why they have to be used in synchronous mode.

I guess the only way to achieve a simultaniously working proE session is the asynch mode - but haven't had time to give it a try yet.

Thanks for your answer so far anyway.

Top Tags