Hi,
I would like to write a script which extracts information from a Fit Least Squares report. That part's OK. The issue is that I want the script to look at what windows are already open in the user's session, choose one and then get the information.
I can cycle through the active windows and identify which one I want to use, but I'm having trouble accessing the Report layer that sits within the Window. When I've looked at the Tree Structure of the output report it stops at the top disclosure level. How do I get from my code which assigns the window [myWindow = window(3);] to rModel = someVariable << Report; ??
Or is there a different/better way to do this? My only other thought at the moment is to use myWindow << Get Text; and then do a lot of text searching to find the parts that I need (I'm not interested in the charts, just summary data from the tables). However, I can see this getting quite complex and more prone to error.
Appreciate any insight you guys have
You can use the reference saved in myWindow as the root of the display tree. Use subscripts to access the display box with the results that you want to extract. If I want to grab the parameter estimates, then I would use code like this:
my estimates = myWindow["Parameter Estimates"][NumberColBox(1)] << Get As Matrix;