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

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

OnAfterWindowChange

bmortensen
2-Guest

OnAfterWindowChange

Hello all,


Does anyone have any experince with theOnAfterWindowChange event?


I have done some preliminary testing and found that it doesn't fire in all cases:



  • Shell: If proe file from windows explorer (by dobbleclick) it fires correct

  • If I open a sub-component from the tree it fires correctly

  • If drag'n'drop a file from windows explorer is does NOT fire

  • If open from proe file dialog it does NOT fire

Why isn't the event triggered in the 2 last cases? It doesn't matter if I have a window with a model shown already, in which case it creates a new window. I can kindof understand that it doesn't trigger if i only have an empty window.


I'm trying to update the model, when the user somehow opens a new "topmodel". I could do it on the retrieve event, but that will not trigger in the second case, since the sub-component is already in memory.


Have I missed some event?


thanks,


\Bjarne




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.
4 REPLIES 4

The Pro/TOOLKIT notification type PRO_WINDOW_OCCUPY_POST reacts on all actions that Bjarne has tested with PRO_WINDOW_CHANGE_POST (OnAfterWindowChange in JLink):



  • Open a sub-component from the tree > OK

  • Drag'n'drop a file from windows explorer > OK

  • Open from proe file dialog > OK

  • Creating new model/drawing > OK

  • Open model from drawing tree > OK

The notification type PRO_WINDOW_OCCUPY_POST is available in Wildfire 5 or newer.


Andreas


__________________________________


Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Rudolf-Diesel-Str. 6
D-65439 Floersheim / Germany


phone: +49 6145 598296
mail: -

Do you know what its called in Jlink?


I cannot find it in the documentaion or directly in the api


I have checked the DefaultModelActionListener andDefaultSessionActionListener classes


thanks,


\Bjarne


> Do you know what its called in Jlink?


OnAfterWindowChange is inSessionActionListener, an interface in the com.ptc.pfc.pfcSession package.


Marc
--
Marc Mettes

Bjarne,


a solution from Wildfire 5 on might be this procedure:


1. Pro/E's config.pro has a protkdat option that starts a Toolkit app


2. The toolkit app starts and registers a jlink app


3. The toolkit app implements the listener/notification for OnWindowOccupy and this calls a jlink function from the jlink app started in step 2 (toolkit can do this).


I think it is not possible to execute a jlink function from a jlink app that's already running.Toolkit must start the jlink app to have a "jlink app handle" for later function calls.


Andreas


__________________________________


Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Rudolf-Diesel-Str. 6
D-65439 Floersheim / Germany


phone: +49 6145 598296
mail: -

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags