Skip to main content
August 30, 2012
Question

How to know the name of paragraph style group being deleted from InDesign?

  • August 30, 2012
  • 1 reply
  • 1070 views

Hi.

I am working on a plugin and need to know the name of paragraph style group being deleted from InDesign.

I have implemented a document observer and attached IID_IPARASTYLEGROUPMANAGER. With this I can get the notification whenever any paragraph style group is deleted. The value of "theChange" is kDeleteParaStyleGroupCmdBoss.

Now i tried to get the pointer to IUIDData for this command but I got Null pointer. This must be because the group has already been deleted by then.

Is there any way to get the name of style group when it is deleted?

This topic has been closed for replies.

1 reply

Legend
August 31, 2012

The style group is already deleted on that notification.

In some cases InDesign sends pre-notifications with a different command state, unfortunately here it is missing.

I'd probably build a map(UID/name) on opening the document and maintain it e.g. on rename.

Alternatively you can watch every command before execution (interceptor etc.) even though that is not recommended for performance reasons.

Dirk

September 4, 2012

I have implemented the Command interceptor now and I want to abort the command if a particular style group is deleted.

Currently I am getting call for kDeleteParaStyleCmdBoss but how to identify this command is being executed for which style group? Basically I need to check the name of style group & then stop processing of this command.

Inspiring
September 12, 2014

Hi, did u get the answer to your question yet? I am also trying to figure out the same thing