Skip to main content
Inspiring
January 25, 2024
Answered

C++-API: How to set a Text in the History when calling a plugin

  • January 25, 2024
  • 1 reply
  • 281 views

Hi

with my plugin, I'm doing some modification on the Artwork. However, there is no specific Name in the History displayed. How can I set a name for the change? (eg. Undo My Plugin)
Thanks

This topic has been closed for replies.
Correct answer OlegG

There is SetUndoRedoCmdTextUS method in AIUndoSuite.

 

From documentation:

 

AIAPI AIErr(* AIUndoSuite::SetUndoRedoCmdTextUS)(const ai::UnicodeString &undoText, const ai::UnicodeString &redoText, const ai::UnicodeString &cmdText)

 

Specifies the localizable text(Unicode String) for Undo, Redo, and History Panel menu items. Illustrator uses these strings for the menus and history panel as needed.

Note: Illustrator automatically handles the undo mechanism for plug-in filters. Filters should not use this function.

Parameters:

undoText - Unicode String text for the Undo menu.

redoText - Unicode String text for the Redo menu.

cmdText - Unicode String text for history panel

1 reply

OlegGCorrect answer
Inspiring
January 30, 2024

There is SetUndoRedoCmdTextUS method in AIUndoSuite.

 

From documentation:

 

AIAPI AIErr(* AIUndoSuite::SetUndoRedoCmdTextUS)(const ai::UnicodeString &undoText, const ai::UnicodeString &redoText, const ai::UnicodeString &cmdText)

 

Specifies the localizable text(Unicode String) for Undo, Redo, and History Panel menu items. Illustrator uses these strings for the menus and history panel as needed.

Note: Illustrator automatically handles the undo mechanism for plug-in filters. Filters should not use this function.

Parameters:

undoText - Unicode String text for the Undo menu.

redoText - Unicode String text for the Redo menu.

cmdText - Unicode String text for history panel

Inspiring
January 31, 2024

Thanks, that helped. I missed the Undo-Suite when looking at the list of Suites