Hello everyone,
I recently read a blog by Rohith about exporting images after each design point run and one more about exporting a Frequency curve from a Harmonic Response analysis, all sing Python object After Post.
I am running into a problem when I try to do the same for a Force reaction result that I have in my static analysis:

Apparently the force reaction object does not have a tabular data function.
I tried to access the object using the following snippet:
# get the chart object
chart = DataModel.GetObjectsByName("Force Reaction")[0]
chart.Activate()
#time.sleep(2
# open the file for writing
with open(outputFile, 'w') as f:
# write column headers
#f.write("Time [s]\tContactForce [N]\n")
# get tabular data
tabularData = ExtAPI.UserInterface.GetPane(MechanicalPanelEnum.TabularData)
con = tabularData.ControlUnknown
# loop through rows and write column entries to file
for row in range(1,con.RowsCount+1):
f.write("{}\t{}\n".format(
con.cell(row,2).Text,
con.cell(row,6).Text))
This works, but only if Mechanical UI is open. It does not work for design points that run in the background.
Do you happen to know a workaround for this problem? Would appreciate a response on this!
Thank you.
Regards,
Paritosh