In the Details of the Python Code object make sure that the 'Target Callback' is set to 'After Post'. I tested your above code on a simple model and it worked though I did change what was written to the file from result data to just the DP number. Since I only wanted to verify that something was written at each DP.
Please Login to Report Topic
Please Login to Share Feed
You are navigating away from the AIS Discovery experience