cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Mathcad ABC: I Is for Include Worksheets

mzeftel
12-Amethyst

Mathcad ABC: I Is for Include Worksheets

Most engineers have the need to standardize definitions, programmed functions, and some calculation formulas across their Mathcad worksheets and even more so across departments and the entire company. The Include Worksheet or  Referenced Worksheet feature allows you to include a worksheet of definitions inside other worksheets.

Including standard definitions, programmed functions, and calculation formulas at the start of every worksheet, saves you time and helps ensure that your calculations are consistent and based on the same assumptions.

Best Practices

  1. First develop standard worksheet definitions and formulas that can be verified and documented.
  2. Gather the definitions and other common elements like functions into one or several worksheets and post them on a network.
  3. Start all new worksheets by including these verified worksheets.

If a value needs to be updated, it's a far easier matter to update the definition worksheets, rather than having to track and update a formula in all existing worksheets.

Including Worksheets in Mathcad 15


In Mathcad 15 and earlier versions of Mathcad, including one worksheet inside another one is called referencing a worksheet.

Inserting a reference to worksheet A inside of worksheet B, makes worksheet B behave as if you had inserted the actual regions from worksheet A inside of B, at that location.

  1. Choose Reference from the Insert menu.
  2. Browse to select a worksheet to insert or type in the full path or Internet address to a worksheet.
  3. Choose "set relative path", if you want a relative path rather than an absolute path to the worksheet. If you move both worksheets, the relationship between them is retained.

The referenced definitions and functions take effect at the point of the insertion and below it.

Note, if you make any changes to the included worksheet, you must press F9 (Calculate) before the changes can take effect.

Example

  1. Worksheet A contains definitions for the variables below:

two definitions

2.  Create Worksheet B with your calculations.

3.  Insert a reference to Worksheet A above the calculations in Worksheet B:

Include Worksheet

4.  Define a formula using the definitions.

Axial compression stress

equations

If you update the definitions in Worksheet A, the calculations in Worksheet B and all other worksheets based on Worksheet A, will update upon recalculation.

Including a Worksheet in Mathcad Prime 1.0

Including a worksheet into another worksheet works very similarly in Mathcad Prime 1.0. We've added caching of definitions.

You can cache the definitions in Mathcad Prime 1.0. In earlier versions of Mathcad, if you moved a worksheet with included worksheets, and forgot to also move the included worksheet, the definitions would no longer work. That makes it difficult to share files.


In Mathcad Prime 1.0, choose Cache Worksheet from the Input/Output tab and all definitions from included worksheets are cached. Caching is on by default. Only necessary calculatations are cached, keeping the parent worksheet from becoming too large. Caching included worksheets, makes it very easy to share or to move your worksheets, without worrying about forgetting any of the extra bits.

2 REPLIES 2

It is a pity that we can not from Mathcad Prime to do References to Mathcad-function on the Internet.
See http://twt.mpei.ac.ru/ochkov/WSPHB/Ochkov-Znamensky-Web-Rankine-Eng.html

wayne
12-Amethyst
(To:mzeftel)

I've been doing this for a long time now, if you have a lot of functions, this will also make the parent worksheet recalcualte faster.

But, when archiving your documents, you need to include the versions of the referenced documents that you were using during that period; otherwise if you need to go back at a later date to make changes or additions, you may need to spend a lot of time updating the old file.

LIke everything else, if you make changes to the refrenced files willy-nilly (haphazard fashion), you could screw up a lot of other worksheets.

Announcements

Top Tags