Getting Started
In order to define a contextual action for XSection windows, you need to put your Python script in your Python directory under a directory called Contextual_XSection_Window.
Go to Tools->Options->Environment->Python Scripts (or Tools->Options->Python->Scripts in INTViewer 5.2) and click "Refresh from Disk". Your script should be listed automatically.
You will now be able to execute this script from the contextual menu of the XSection window:
This script will iterate through all the layers in the window, and take a screenshot of the content visible in the window.
This script is attached to the bottom of this article.
Here are the exported screenshots from the example above: