My debug builds have an extra toolbar button that uses this action to regenerate tool path offsets. It is useful when I'm debugging toolpath generation. It's not used in release builds. For obvious reasons you cannot recalculate the tool paths while the post is running so this will be queued until the post has finished.
I just realised why those colours aren't being applied. The toolpath display is a basically a custom post processor. You can't run the post processor from within itself. Any changes you have made will again be queued until after the post has finished. This probably also explains why trying to run the job report doesn't work. It's also a custom post.
I think the only way to get this all to work correctly would be to write a plugin to do it. You'd create a toolbar button that runs the post (use the actRUN_POST action) then pretty much do what you are currently doing in OnFileClosed. I have attached a simple demo plugin that creates a toolbar button and menu entry.
That may indeed be the only way then. I'll see how much it bothers me, I may start working on the plugin. The screenshot turns out fine for a dozen parts or less in the job, but when there is a whole sheet of parts, the rapids masks the parts.
Since all I am concerned about is a screenshot of the part outlines and the material outline, I though about just turning off the rapids display and the toolpath display with "actGL_RAPID" and "actGL_PATHS" but that only takes effect after the post finishes as well, regardless of where it is in the post.
Thanks for all of the help Les! Sorry this has been such a bother.