For future reference of those who may be reading the thread for help with their MathCad challenges.
MathCad, Help > QuickSheets Contents, click on “Programing”, scroll down and click “Mathsoft Controls”
Then scroll down to the example you’re interested in, left click and select “Edit Script…”...