Schedule Your Next Mathcad Prime Task in Windows 7




Let’s say that you want to run a Mathcad Prime worksheet at a specific time of day without user intervention. For example you need to generate Excel reports overnight, do some computations with the extracted data, and have the files ready first thing in the morning.

Mathcad Prime can schedule jobs for any time of day

Using Windows 7 with Mathcad Prime, you can do it. This article shows you how.

Create a worksheet

Start by creating a Mathcad Prime worksheet that reads an external file generated on a schedule, does a computation, and writes the result back to the same Excel sheet:

Reading the values from the Excel file



Mathcad computes the eigenvalues and writes them back in the same Excel sheet

Use the VB script

Next, you will need a Visual Basic script to run via Task Scheduler. PTC has already created this VB Script for the current worksheet (download the script here). To make it work for other worksheets, just open the script using Notepad and rename it.

The Script does the following:

  • Launches Mathcad Prime,
  • Loads the worksheet previously created ,
  • Executes the worksheet,
  • Waits 1 second, and then closes the worksheet and Mathcad Prime.

Create an assignment in Task Scheduler

After you have created the Mathcad worksheet and downloaded or edited the VB script, you need to tell the Task Scheduler that a new assignment is ready. Follow these steps:

  1. From Control Panel > Administrative tools, click the Task Scheduler tool.

 



  1. In the Actions panel, select Create Basic Task and type the Name and Description.

  1. Select the Trigger frequency.



  1. Enter a start time.

  1. Then load the VB script that will run the Mathcad worksheet and compute the data you need. Click Action > Start a Program and then enter the path to the script.



Now, that you have everything prepared, you can program the Mathcad worksheet to be an automated task that runs at a set time in Windows 7. 

Finding Answers with Mathcad

Mathcad is engineering math software that helps you perform, analyze, and share all your most vital calculations. Engineers at ground-breaking companies use it, and now you can try your own free-for life-version and see what this powerful math software can do for you. Download PTC Mathcad Express today.

Download PTC Mathcad Express free