Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
the meaning of this and similar API ProWindowCurrentClose() is to control what happens (closing current window in this case), once "Creo gets the control back".
"Creo gets the control back" means, the synchronous app (launched from within Creo Parametric automatically or manually) OR ANY other Creo Parametric process which takes Creo busy, has finished.
For that reason, there is nothing to FORCE Creo getting the control back.
I think the article could have been misunderstood, hence I refined it: https://www.ptc.com/en/support/article/CS210868
Regards
Addendum (from the API Wizard):
In opposite to function ProWindowCurrentClose(), similar ProWindowDelete() closes a window and breaks the object-to-window attachment. The function deletes the window, if it is not the base window.
You cannot break the attachment for the currently active window. Use the function ProWindowCurrentSet() to make a different window be the active window before calling this function.
This function is equivalent to the Creo Parametric option to quit the window.
@MichaelW wrote:
Addendum (from the API Wizard):
In opposite to function ProWindowCurrentClose(), similar ProWindowDelete() closes a window and breaks the object-to-window attachment. The function deletes the window, if it is not the base window.
You cannot break the attachment for the currently active window. Use the function ProWindowCurrentSet() to make a different window be the active window before calling this function.
This function is equivalent to the Creo Parametric option to quit the window.
IMHO. The addendum is somewhat misleading. The 'active window' term has very specific meaning in pro/e and toolkit.
The function ProWindowCurrentSet() is not equivalent to the Creo Parametric command to change the window and has no effect on the object returned by ProMdlCurrentGet().
Creo Parametric UI command referred by the user guide is 'View'->'Window'->'Activate' or 'CTRL+A'. This UI command controls the return argument of ProMdlCurrentGet() and therefore is the 'active window'. There is also a post-run function ProWindowActivate to set 'active window' programmatically and it will change the output of ProMdlCurrentGet() as well.
The bottom line is terms 'active window' and 'current window' are not interchangeable...
HIH.
Thank you for this comparison of API wizard statements.
And yes, this is a good point. I think the statements of ProWindowCurrentSet() and ProWindowDelete() should be adjusted accordingly to get aligned to each other.
Lets see what I can do, talking to the publication team.
Michael
Update:
The publication and library documentation were inconsistent in this case and will be corrected in Creo 7.0.6.0, 8.0.2.0 and above.
This investigation is documented in PTC Technical Support Knowledgebase article CS345949 (access to PTC Support required).
The documentation itself is not available before the above product versions have been shipped.
I hope this result will fit your needs.
Regards, Michael