Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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
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.