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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

rwells
4-Participant

units

I am having trouble running out of assigned variables on the same worksheet. In a worksheet there are areas squared off with thin blue dotted lines and thin blue vertical lines. What are they for. And also I realize if I assign any function or value to a letter or symbol, the mathcad remembers that and reads from left to right down like a book. As the worksheets get bigger, this becomes a problem. Cant I just drag thos blue lines around some how and create a new section (that does not keep those variables assigned or defined) within the same workbook?

1 ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald II
(To:rwells)

What version of Mathcad are you using? Can you post an example worksheet showing what you mean / want to do?

If you are using Mathcad 15 or earlier, then I suspect the lines you are referring to are the printed page boundary markers and should reflect the paper size of your selected printer - if you change the paper size in Page Setup then the lines will shift to accomodate the new size. They serve purely to demarcate how the worksheet will look when printed out and have no functional purpose (ie, they are not 'section' boundaries).

You are correct in that Mathcad evaluates a worksheet left-to-right, top-to-bottom. Once you define a variable, its value remains in force from that point onwards unless you redefine it. A redefinition applies from that point onwards; you may redefine a variable as any type. Importantly, redefinitions do not back propagate up the worksheet. Two exceptions to this are globally defined variables and locally defined variables.

Mathcad makes two passes through a worksheet when it evaluates it. In the first pass, it looks for any definition made using the global definition operator (the triple bar as opposed to the := operator). It then makes a second pass looking for the normal := definition operators and global operators. Consequently, you could globally define a variable at the bottom of your worksheet and it will be in force for 'normal' calculations at the top of the worksheet ... however, if you then redefine the variable using := before the global definition then the new value will be effective from that point on until the global definition.

Locally defined variables (left arrow) are normally used in programs. They are, as the name implies, only valid within the program and behave like normal programming variable, eg you can define a variable before a loop then have the program make changes to the variable at the end of a loop that will then remain in effect at the next iteration of the loop.

So, if you've managed to stay with me so far, you can't rearrange the worksheet to make Mathcad forget about previous definitions. However, it is not normally a major problem for writing worksheets and there are some truly complex and monstrous worksheets out there in the wild. It may be that your 'problem' can be addressed in other ways that make better use of Mathcad's structure and capabilities.

Stuart

View solution in original post

5 REPLIES 5

Show please a picture or/and a Mathcad-sheet!

rwells
4-Participant
(To:ValeryOchkov)

Unfortunately I am not able to do this. I only have mathcad 2000 and no internet. But I am generally able to get good advise and tips here anyway. I know that there is a way to tab or reset the ruler that allows mathcad regions to operate independantly of previously defined variables. I am just to lazy to look it up.

StuartBruff
23-Emerald II
(To:rwells)

What version of Mathcad are you using? Can you post an example worksheet showing what you mean / want to do?

If you are using Mathcad 15 or earlier, then I suspect the lines you are referring to are the printed page boundary markers and should reflect the paper size of your selected printer - if you change the paper size in Page Setup then the lines will shift to accomodate the new size. They serve purely to demarcate how the worksheet will look when printed out and have no functional purpose (ie, they are not 'section' boundaries).

You are correct in that Mathcad evaluates a worksheet left-to-right, top-to-bottom. Once you define a variable, its value remains in force from that point onwards unless you redefine it. A redefinition applies from that point onwards; you may redefine a variable as any type. Importantly, redefinitions do not back propagate up the worksheet. Two exceptions to this are globally defined variables and locally defined variables.

Mathcad makes two passes through a worksheet when it evaluates it. In the first pass, it looks for any definition made using the global definition operator (the triple bar as opposed to the := operator). It then makes a second pass looking for the normal := definition operators and global operators. Consequently, you could globally define a variable at the bottom of your worksheet and it will be in force for 'normal' calculations at the top of the worksheet ... however, if you then redefine the variable using := before the global definition then the new value will be effective from that point on until the global definition.

Locally defined variables (left arrow) are normally used in programs. They are, as the name implies, only valid within the program and behave like normal programming variable, eg you can define a variable before a loop then have the program make changes to the variable at the end of a loop that will then remain in effect at the next iteration of the loop.

So, if you've managed to stay with me so far, you can't rearrange the worksheet to make Mathcad forget about previous definitions. However, it is not normally a major problem for writing worksheets and there are some truly complex and monstrous worksheets out there in the wild. It may be that your 'problem' can be addressed in other ways that make better use of Mathcad's structure and capabilities.

Stuart

OK, just seen your reply to Valery. The same restrictions apply to Mathcad 2000 as I outlined above. What are you trying to do?

Stuart

rwells
4-Participant
(To:StuartBruff)

That is perfect. I didnt realize the blue lines are only for printing. And definations or assignment of variables does not work going backwards (up the page and to the left). Thanks again!

Top Tags