|
Antoine Aula wrote:
Hi everyone,
I would like to know if there's a way to use a reference within a for loop in Mathcad 15. The subject has already been discussed here but the proposed solution wasn't really working well and gets too complicated with a bigger worksheet. Nevertheless, the principle is there.
To schematize, i'm trying to create a worksheet like this :
for i from 1 to n
* define variables used in reference calculation
* call reference
* get results(i) from reference
next i
show results
I hope this is technically possible, so please let me know if you know an advanced version of the pre-cited method.
|
In short, "No".
As you've probably found out from the previous threads, there isn't a built-in way to reliably loop over a general "reference" worksheet. All of the workarounds involve playing around with components to gain access to the automation interface.
One possibility is to rewrite your referenced worksheet in terms of range variables and define the range variables (plus any other application-dependent variables) in the calling worksheet, as per the simple example below.
Referenced Worksheet:

Calling Worksheet:

But this is rather messy and doesn't make full use of the power of Mathcad.
Needless to say (but I'll say it anyway) there is a Very Long Standing Feature Request to have this kind of capability built-in to Mathcad.
Stuart