Skip to main content
Participant
September 1, 2026
Question

InDesign C++ SDK: Which PMIID / Protocol should I observe to detect swatch changes

  • September 1, 2026
  • 0 replies
  • 20 views

Hi everyone,

I am developing an InDesign C++ SDK plugin that features a custom UI panel containing an EVEColorListDropDownWidget. My goal is to keep this color dropdown widget automatically synchronized whenever changes occur to the document's swatches—including adding new swatches, deleting existing ones, or modifying swatch properties (such as color values or swatch names).

I am implementing a custom CObserver class attached to the active document (kDocBoss) via ISubject. However, I am unsure about the exact PMIID protocols required to reliably catch all relevant swatch events.

Specifically, I would like to ask:

  1. Which PMIID(s) should I listen to? Should I attach my observer using IID_ISWATCHLIST,  or a combination of them?

  2. Where should I attach the Observer? Is attaching to the document's ISubject (kDocBoss) sufficient, or do I need to attach directly to ISwatchList / kSwatchListBoss?

  3. Command Filtering: In the Update() method, which ClassIDs (theChange parameter) should I handle to cover additions, deletions, name updates, and color modifications (e.g., kAddSwatchCmdBoss, kModifyColorCmdBoss)?