Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi Guys, Good Evening
i want to disable the "File->Save" the "Save" Option through toolkit. if any one knows please help
regards
Aravind
WHY????
What good is a system if you cannot save your work?
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);
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.
no, my requirement is, once the model opens this default save option should be disable, same like as "check in" Option.
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.
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.