I did “global aldec”, all lower case.
The error message was referencing an all uppercase $ALDEC but “global aldec” fixed this issue. I noticed the same thing with “puts $aldec” vs “puts $ALDEC” as you describe.
No, there is no $aldec used in the $PATH_TO_SIM_DIR on my machine, that just points to the project directory on my C:/ drive.
Thanks,
Brad