Answer

Yes. The clearest route is to select the Macro by name in the item’s Menu tab. PME resolves the linked Macro as an action target, so the caller does not need to know its generated Blender operator idname.

Use a Command item only when opening the Macro is one branch of a larger decision:

open_menu("My Cleanup Macro")

Recipe

  1. Create and test the Macro on its own.
  2. Create the Pie, Popup Dialog, Panel Group, Stack Key, or other caller item.
  3. In the caller’s Menu tab, choose the Macro by name.
  4. Invoke the caller from the editor, mode, and keymap where the Macro’s first operator is valid.

For a conditional caller, keep the branch small:

open_menu("Edit Cleanup") if C.mode == "EDIT_MESH" else open_menu("Object Cleanup")

Pitfalls

  • Link the Macro by name instead of hard-coding bpy.ops.pme.macro_*; PME can recreate that generated idname when the Macro changes.
  • A Menu link preserves the caller’s Blender context. An Edit-mode Macro still needs an editable mesh in a valid editor.
  • Give the Macro a stable, descriptive name before linking it from several places.

Sources