TotalEnergy from CASTEP

Dear MS users,

i want to read the final Energy from a CASTEP run, like this

\\\$dat = \\\$castep->Energy->Run(\\\$doc, Settings(...) ); \\\$rep = \\\$dat->Report->content; \\\$totE = \\\$dat->TotalEnergy;


but i get the error : There is no function or property named "TotalEnergy" on type "KeyValuePairs".
I can access the Report, and could read the number from that but using TotalEnergy would just be so much more convenient.

Scripting documentation says the Results Object should have a TotalEnergy value...

thank you for any ideas!
Martin