Safeguarding your calculations MathCad Help

The ease with which you can alter a Mathcad worksheet can present a problem. It is all too easy to alter a worksheet and to change things which are not meant to be changed.For example, if you’ve developed and thoroughly tested a set of equations, you may
want to prevent anyone from tampering with them. To avoid this, you may want to safeguard these equations by locking them up in such a way that you’ll still be able to use them even though nobody will be able to change them. Pro You can use Mathcad Professional to lock a set of equations. To do so:
• You designate a particular area in your worksheet as a lockable area.
• You place the calculations that you want to safeguard into that lockable area.
• You lock the area. Once an equation is safely inside a locked area, nobody will be able to edit it. That equation will, however, continue to affect other equations in the document. For example, if you define a function inside a locked area, you’ll still be able to use that function anywhere below and to the right of its definition. You will not, however, be able to change the function’s definition itself. The remainder of this section describes how to specify the beginning and the end of the lockable area as well as how to lock and unlock that area once you’ve created it

Specifying the lockable area

A lockable area is designated by two lines as shown in Figure 4-3. The open padlocks abqve and below these lines indicate that the area is now unlocked. As long as this area remains unlocked, you can edit equations and text within it as freely as you would anywhere else in the worksheet. To designate a lockable area:
• Choose Lock Regionsee-Set Lock Area from the Format menu. Mathcad inserts a pair of lines like those in Figure 4-3. These mark the boundaries of the lockable area.
• Select either of these boundary lines just as you’d select any region: by dragging the mouse across the line or by shift-clicking on the line itself.
• Once you’ve selected the boundary line, drag it just as you’d drag any other region. You should position the boundaries so that there’s enough space between them for whatever equations you want to lock. You can have any number of lockable areas in your worksheet. The only restriction is that you cannot have one lockable area inside another.

Figure 4-3: The area between the two lines is a lockable area. Theftrst pair is still unlocked; the second pair was locked on the date shown.

Figure 4-3: The area between the two lines is a lockable area. Theftrst pair
is still unlocked; the second pair was locked on the date shown.

Locking up the calculations

Once you’ve placed whatever equations you want to lock up inside the lockable area, you are ready to lock it up. You’ll be able to lock it up either with or without a password. To do so:
• Click in the lockable area.
• Choose Lock Regiousee-Lock Area from the Format menu.
• You’ll see a dialog box asking you if you want to set a password. Click “Yes” if you want to require a password to unlock the area. Otherwise click “No.”
• If you clicked “Yes,” you’ll be prompted for a password. Type any combination of letter and numbers. Keep in mind that the password is case sensitive.  Once locked, the locked area looks like the lower pair of lines in Figure 4-3. The date and time the area was last locked is shown above and below the boundary lines. Locking without a password is useful when you just want to prevent yourself from absent-mindedly changing something, and you don’t want to worry about having to remember a password. When a region is locked without a password, anyone will be able to unlock it by simply choosing Lock Regions-e-Unlock Area from the Format menu. Locking with a password is useful when you want to prevent unauthorizedchanges to a worksheet. When you choose till option, make sure you remember your password. If you forget your password, you may find yourself permanently locked out of that lockable area.

Unlocking the calculations

If you want to make changes to an equation inside a locked area, you’ll have to unlock it first. To do so:
• Click on one of the boundary lines of the region you want to unlock. Mathcad highlights the boundary line.
• Choose Lock Regions-e-Unlock Area from the Format menu.
• If a password is required, you’ll be prompted for the password.
Once an area is unlocked, you’ll be able to make whatever changes you want to just as freely as you would anywhere else in your worksheet.

Deleting a lockable area

You can delete a lockable area just as you would any other region. To do so:
• Make sure the area is unlocked. You cannot delete a locked area.
• Select either of the two lines indicating the extent of the locked area by dragging the mouse across it.
• Choose Cut from the Edit menu.

Posted on November 20, 2015 in Worksheet Management

Share the Story

Back to Top
Share This