Skip to main content
1-Visitor
August 25, 2016
Question

Referencing Solutions

  • August 25, 2016
  • 21 replies
  • 7064 views

Hello All,

I need some help with MathCAD Prime 3.1.  I have a solution on page 3 that I would like to reference on page 1.  Is there a way to do that?

Please help!

21 replies

19-Tanzanite
August 25, 2016

What do you mean by "reference" it? Just display it, or use it in some way to feed back into the equations lower down?

1-Visitor
August 25, 2016

I just want to display it.

1-Visitor
August 25, 2016

Assuming your Mathcad sheet looks something like this:

A:=2

B:=2*A

C:=B-1

...

(multiple pages of calculations)

...

Y:=X/4

Z:=Y+3

You say that your goal is to display the result of Z on page 1 (near the definition of A).  I assume this is so you can easily see how Z is affected by your input of A.

To achieve this, you could use the global definition for each variable A through Z and then put Z= (with a regular evaluation equals sign) on page 1.  However, I would not recommend this.

Z= (evaluated)

A≡2

B≡2*A

...

Z≡Y+3

Alternatively, you could globally define A on page 3 and put A= (with a regular evaluation equals sign) on page 1 in place of the definition of A.  Then you would need to modify A on page 3 and you can easily see how it affects Z beside it.  This isn't exactly what you asked for (putting definition of A on page 3 instead of putting result of Z on page 1), but depending on your situation it may work for you.

A=(evaluated)

B:=2*A

...

Z:=Y+3

A≡2

1-Visitor
August 25, 2016

Depending on what you're trying to achieve, a global definition may do the job.

12-Amethyst
August 26, 2016

Hi Joe.

For mathcad 15 you can do that with scriptable components, for example can see a button and a text box for this at Extra Components and Controls from Richard Jackson.

But Prime don't accept those scripts. Maybe you can save the "results" into a file (xls, prn, txt, etc.) and load it at page 1. Of course, Mathcad don't eval the write part until it is showing into the screen, so users must to scroll down, but if the file with the data is in the hard disk, can show the results without scrolling.

Best regards.

Alvaro.

25-Diamond I
August 26, 2016

If you don't like the idea of hiding the whole calculation in a collapsed region at the top, an alternative could be to create a sheet with the input variables at the top, followed by all calculations.

Then delete the input variables, create a new sheet with the inputs on top. Then insert a reference to the calculation sheet and then you can use the result in the following summary.

Personally I would prefer the collapsed region as its all selfcontained in one single file.

WE

12-Amethyst
August 26, 2016

It's a nice option. Actually, what Joe ask can be done in Excel very easy, as shows this attach.

Best regards.

Alvaro.

25-Diamond I
August 26, 2016

> Actually, what Joe ask can be done in Excel very easy,

Sure, because the concept of the two programs (fortunately) is quite different.

Mathcad is oriented towards normal reading style, that is top-> down, left->right. So its hard ans unnatural to display a result before its calculated. We can only do it the hard way by using global assignments (which often is not possible for a calculation sheet) or using scripted components in MC15. Or we can fake it using a collapsed region or a referenced second worksheet.

Excel is oriented towards a rigid and inflexible grid and its addresses. So calculation order is hard to follow but you can display a result anywhere if you reference the appropriate cell.

Two completely different approaches and I would not suggest using Excel for any serious technical calculation, though.

Having a summary at the top of a report is a need which often comes up here and so far no perfect solution could be provided. The collapsed region seems the most appropriate and natural approach for me. And for documentation its quite easy to print just the summary with the collapsed region in a pdf and then append the full sheet with expanded region. Of course you would achieve the same effect if you just print the last page with the summary first and then follow with the full sheet.

Page numbers will not be correct that way, though. As already said - no perfect solution in sight.

It sure would be nice if Mathcad could provide the ability to put together a couple of worksheets in a single file which could reference each other.

It would be nice if Mathcad could provide the ability to turn a whole sheet or part of it into a function.

It would be nice if .....

Werner