0 for helpMany commands and queries work only in a particular state (layout, story editor). Using this query to check the state of the publication before executing these commands and queries will reduce the likelihood that an exception will be thrown.
1 for no publication open
2 for nothing selected or no text highlighted
3 for text highlighted with text tool
4 for object (graphic or text block) selected
5 for place mode
6 for story editor, empty story
7 for story editor, no text selected
8 for story editor, text selected
Example.
PGetPMState state;
if (state == 4) ... // an object is selected
Comments or suggestions? Contact Adobe Developer Support