Skip to main content
10-Marble
March 9, 2016
Solved

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

  • March 9, 2016
  • 1 reply
  • 3130 views

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

disable save.jpg

Best answer by MarkStallard

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  |+|

1 reply

1-Visitor
March 15, 2016

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  |+|

10-Marble
April 25, 2016

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 !

17-Peridot
February 15, 2018

Hello @Andy.Hsieh

 

How you resolved this task?