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

How to give control back to creo parametric

supriyar
5-Regular Member

How to give control back to creo parametric

I am using Creo Parametric - Release 5.0 (connected) 5.0 5.0.1.0

How to give control back to creo parametric, when using API ProWindowCurrentClose,
I referred to article CS210868, Which Macro should I load for this particular API to work.
5 REPLIES 5

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.

FV
17-Peridot
17-Peridot
(To:MichaelWunder)


@MichaelWunder 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

Announcements