Layouts cannot find formulas after computer crash

My computer crashed and after rebooting, found that when I pull up any layout, I get an error
"ERROR: The formula file (null) referenced by this chart cannot be found.
Current working directory: C\Program Files (x86)\Amibroker
Please make sure that all paths are correct and AFL formula is present in the above location.
If current working directory is wrong, check 'Start In' property of Amibroker shortcut/icon."
The formulas are in tact, the layouts also seem intact (from what I can tell without formulas being displayed). No backup with current work available. Tried moving broker.newcharts.bak to broker.newcharts, didn't work.
Older backed up version of broker.newcharts did not work, even with older layouts.
Not knowing how this works, it seems like the formula map to layouts has been corrupted.
Similarly, my watchlists were also corrupted. It added some blank lines at the beginning of the watchlist file. Deleted them and the watchlist is restored.
How can I recover my layouts?

This may happen if
a) you experienced a crash (data were not saved properly)
b) you moved AmiBroker from different machine but folder structure and/or names are different

You may try loading some other layout from "Layouts" window to see if the chart loads.

If not, then if you have a backup copy - then please restore:

  • the entire "Formulas" sub-folder
  • broker.newcharts file
  • layouts (AWL files stored in "Layouts" subfolder of your database folder).

Alternatively - just display a new price chart from the "Charts" window (double-click on Price (all in one) and close the chart panes that show the error message).

Thanks for the reply. I had seen your response in another chain, tried it to no avail. Had to rebuild AB from scratch. The good news is this sure is one way to clean out my old afl code :>)