Skip to main content
10-Marble
Mar 9, 2016 3:50 AM UTC
Solved

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

1-Visitor
Mar 15, 2016 2:31 PM UTC

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

3 replies

1-Visitor
Mar 15, 2016 2:31 PM UTC

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

Translate
10-Marble
Apr 25, 2016 3:31 AM UTC

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 !

Translate
17-Peridot
Feb 15, 2018 5:24 PM UTC

Hello @Andy.Hsieh

 

How you resolved this task?

Translate