Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How disable the "Save" menuitem??

New Here ,
Jun 11, 2008 Jun 11, 2008
Hi!

I want to disable the "Save" function in my plugin, how can I do that?

Thanks!

hanyang
TOPICS
SDK
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Jun 16, 2008 Jun 16, 2008
As far as I know, you can't control a native Illustrator menuitem I'm afraid. I presume you're trying to prevent the save operation, but perhaps there's another way to accomplish your aim. At least, I hope so, because I don't know of any way to prevent saving. If you expand on your problem, maybe I can suggest something.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 20, 2008 Jun 20, 2008
Actually, I just thought of a hacky way to do this. AIDocumentSuite has a method SetDocumentModified() -- if you set this to false, Illustrator will not allow the user to save because, well, there's nothing TO save...right? :)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2008 Jun 25, 2008
Thanks for your suggest!!

I've resolved my problem.

Best Regards,

hanyang
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2009 Feb 27, 2009
Hello,

I have got almost the same question.
I have customize Illustrator's save menu by adding a "custom save menu item". The problem is that this item is always enable, even if no documents are opened.

So, how could i disable or enabe this item, to does like Illustrator does for its save item.

Thanks.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 27, 2009 Feb 27, 2009
You need to configure your menuitem when you create it to request update messages -- make sure you specify kMenuItemWantsUpdateOption as option when you create it. That way you get notified by illustrator whenever the menu on which your menuitem is about to be displayed. You can respond to the event and decide if you item is enabled, disabled, checked or unchecked, even set its text based on whatever you decide.

Additionally, if you want to reduce some of the work you have to do, you can use AIMenuSuite::UpdateMenuItemAutomatically() to specify conditions in which you want AI to automatically handle your menuitem for you. In our product we often let AI handle the 'no document open' case for us.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 03, 2009 Mar 03, 2009
LATEST
Thx alot, for all answers!
Very helpful to me!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines