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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Re-Activate Ribbon menu function

ptc-4809772
3-Visitor

Re-Activate Ribbon menu function

Good morning everyone,

I'm using Creo 10 and from the "Tools" ribbon menu I start my c# application.

We can do everything but in the "Model" menu a lot of function are disabled especially "Parameters". I don't understand why this happen when we start our application and from that application we are able to delete all the custom "Parameters".

 

When we close our app I thought the menu will be active again but this doesn't happen and if I do a right click in the assembly I have the icon for "Activate" it.

 

I tried these option:

https://www.ptc.com/en/support/article/CS288287?_gl=1*1b9p919*_ga*MTIyMzg5NjExOS4xNjg2MTI0MTUx*_ga_1QBT6P6HR1*MTY4NzUwNDM2My4xMS4xLjE2ODc1MDU1NzguMC4wLjA.

 

https://community.ptc.com/t5/Customization/Get-the-model-handle-for-the-activate-component-in-the-current/td-p/387940

 

ProAsmcompConstrRedefUI()  - https://community.ptc.com/t5/Customization/activate-sub-assembly-using-toolkit/m-p/570117/highlight/true#M7653

 

But nothing is working. I have to close the file and open it again to check the "Parameters".

 

ptc4809772_0-1687510950775.png

 

How can enable, with ProToolkit API, the menu during Close function of my application?

Thanks a lot,

Nicola

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
RPN
17-Peridot
17-Peridot
(To:ptc-4809772)

It is hard to tell, my guess would be, that you closed a window, which was activated by your code. In that case you must activate the current window by using CTRL-A. You can save the current window ID, and restore it on app exit,

View solution in original post

2 REPLIES 2
RPN
17-Peridot
17-Peridot
(To:ptc-4809772)

It is hard to tell, my guess would be, that you closed a window, which was activated by your code. In that case you must activate the current window by using CTRL-A. You can save the current window ID, and restore it on app exit,

ptc-4809772
3-Visitor
(To:RPN)

I already tried with restore window ID () and was not working.

Today I try again only with this API function:

 

ProError status;
int window_id;

status = ProMdlWindowGet(curModel, &window_id);
status = ProWindowActivate(window_id);

 

This it's working good. Re-enable the ribbon menu and I can check the "Parameters". 

Announcements


Top Tags