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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

disable Save Option

Aravind98
13-Aquamarine

disable Save Option

Hi Guys, Good Evening

 

i want to disable the "File->Save" the "Save" Option through toolkit. if any one knows please help 

 

 

regards

Aravind

7 REPLIES 7
BenLoosli
23-Emerald II
(To:Aravind98)

WHY????

What good is a system if you cannot save your work?

Aravind98
13-Aquamarine
(To:BenLoosli)

no, i just want to disable the save option once the model opens. i've no idea about to disable the "Save" Option.


ProError err;
ProMdl mdl;
int windowid;
string str = "";
ProName mdlname;
ProStringToWstring(mdlname, (char*)str.c_str());
err = ProMdlFiletypeLoad(mdlname, PRO_MDLFILE_PART, PRO_B_FALSE, &mdl);
err = ProMdlDisplay(mdl);
err = ProMdlWindowGet(mdl, &windowid);
err = ProWindowActivate(windowid);

RPN
17-Peridot
17-Peridot
(To:Aravind98)

This is notifier called on pressing the menu in Creo. Most of the pre notifier will skip the invoked action.


typedef ProError (*ProModelSavePreAction) (ProPath r_model_path);

/*
Purpose: This is the notification function called before saving a model.
<p>
Users must supply this function by calling <b>ProNotificationSet()</b>
with the notify type PRO_MODEL_SAVE_PRE.
If the model name is initialized by this function, the
saving utility will not interactively prompt for the model name
to be saved.
<p>
If this function returns an error, the saving action will be
aborted by Creo Parametric.

Input Arguments:
None

Output Arguments:
r_model_path - The user-supplied function should initialize this
variable to the path to the model to be saved. If it
is not initialized, the system prompts for the model
path interactively.

Return Values:
PRO_TK_NO_ERROR - Successful exit from this function.
Other - An error was encountered. Model saving will be stopped.

Aravind98
13-Aquamarine
(To:RPN)

Aravind98_1-1717046834510.png

no, my requirement is, once the model opens this default save option should be disable, same like as "check in" Option.

 

RPN
17-Peridot
17-Peridot
(To:Aravind98)

That would mean to configure the interface (greyed out) by you, as far I know, you can’t. Save, is for the current model, so you can decide (based on the model handle)  to allow save, or abort, I don’t see a difference, just write something to the message area that you don’t allow to save the model  for whatever reason.

Your model could contain external data for that, just check this during this callback and decide. 

Aravind98
13-Aquamarine
(To:RPN)

@RPN oh ok, appreciate your  effort.

 

regards

Aravind

Hello @Aravind98,

 

It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Announcements


Top Tags