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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to disable or hide the save and save as icon by API ?

Andy.Hsieh
10-Marble

How to disable or hide the save and save as icon by API ?

Is it possible to make icon disabled or hid by API (web.link or toolkit) ?

disable save.jpg

ACCEPTED SOLUTION

Accepted Solutions

Andy Hsieh wrote:

Is it possible to make icon disabled or hid by API (web.link or toolkit) ?

I don't know of a way to do that, and I also don't believe that alone would accomplish your objectives.

If you could remove those entries from the File menu, that would not stop the user from saving the model.

I can think of 3 ways for a user to save the model:

  1. Click the (tiny) Save button in the Quick Access Toolbar
  2. Select File > Save
  3. Type Ctrl+S

A better way for you to approach this in Creo Parametric Toolkit is the function ProNotificationSet. It will let you define custom handlers for when the user saves the model (PRO_MDL_SAVE_PRE) or copies it (PRO_MDL_COPY_PRE).

I don't know exactly why you would want to do this, so I can't say whether it's a good idea. But if you do need to write code that intervenes on model save or copy, then ProNotificationSet is the best technique I can recommend.

|+|  M a r k  |+|

View solution in original post

3 REPLIES 3

Andy Hsieh wrote:

Is it possible to make icon disabled or hid by API (web.link or toolkit) ?

I don't know of a way to do that, and I also don't believe that alone would accomplish your objectives.

If you could remove those entries from the File menu, that would not stop the user from saving the model.

I can think of 3 ways for a user to save the model:

  1. Click the (tiny) Save button in the Quick Access Toolbar
  2. Select File > Save
  3. Type Ctrl+S

A better way for you to approach this in Creo Parametric Toolkit is the function ProNotificationSet. It will let you define custom handlers for when the user saves the model (PRO_MDL_SAVE_PRE) or copies it (PRO_MDL_COPY_PRE).

I don't know exactly why you would want to do this, so I can't say whether it's a good idea. But if you do need to write code that intervenes on model save or copy, then ProNotificationSet is the best technique I can recommend.

|+|  M a r k  |+|

Thanks Mark, you're right, we can't stop user to save or copy model just by my way, and your suggestion may be more effective one !

Hello @Andy.Hsieh

 

How you resolved this task?

Announcements


Top Tags