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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Referencing worksheets

ptc-3134225
1-Newbie

Referencing worksheets

Hello all,

I am pretty new to Mathcad and still in learning stage. I have two seperate mathcad files created by different people. I need to cross refer variables from one file to another. I tried to use "Reference" option available under Insert. But since the files where created by different people, there are few common variable names in these two files so they are overwritten. Is there an option in Mathcad where we can send and receive just few variables from other mathcad file??

Thanks in advance

Deepak

8 REPLIES 8
Werner_E
25-Diamond I
(To:ptc-3134225)

Deepak Somasundaram wrote:

Hello all,

I am pretty new to Mathcad and still in learning stage. I have two seperate mathcad files created by different people. I need to cross refer variables from one file to another. I tried to use "Reference" option available under Insert. But since the files where created by different people, there are few common variable names in these two files so they are overwritten. Is there an option in Mathcad where we can send and receive just few variables from other mathcad file??

Unfortunately, no. A reference acts as if the whole content of the referenced worksheet is copied into the current sheet. So the last definition of a variable "wins".

StuartBruff
23-Emerald III
(To:Werner_E)

One possibility is to add some new variables in between the References to store the values that have duplicate names.

Another possibility, if there are only a few variables, is to write the data to files and then read them back into your worksheet.

Stuart

I tried renumbering, but have lot of index to the variables and it might take more time. Regarding the second option, I am not sure how it can be done. I have couple of inputs in worksheet A which has to be transfered to sheet B and the results from sheet B has to be used sheet A for more calculations.

MikeArmstrong
5-Regular Member
(To:ptc-3134225)

Deepak Somasundaram wrote:

I tried renumbering, but have lot of index to the variables and it might take more time. Regarding the second option, I am not sure how it can be done. I have couple of inputs in worksheet A which has to be transfered to sheet B and the results from sheet B has to be used sheet A for more calculations.

This sounds a little messy. Could you not just add the inputs directly to sheet B to eliminate the first reference? Then all you need to do it write the results from B to A.

Werner_E
25-Diamond I
(To:ptc-3134225)

Deepak Somasundaram wrote:

I tried renumbering, but have lot of index to the variables and it might take more time. Regarding the second option, I am not sure how it can be done. I have couple of inputs in worksheet A which has to be transfered to sheet B and the results from sheet B has to be used sheet A for more calculations.

Neither the input to nor the output from B should be any problem. The input variables have to be defined in sheet A before the reference call to B and you have to take care that you use the vers same variable names here in sheet A which sheet B expects and that those variables are not redefined at the top of B. As for the output variables - sheet A simply has to know their names in sheet B and is able to use them after the reference to B.

The only probelm which can occur is the sheet B may have side effects and changes (because it uses the same names) inadvertently and undesirably variables in A. So you sure have to rework sheet B, either closely looking at its variable names or possibly prefixing every variable name by something like "B_"... which hopefully does not conflict with variable names in sheet A.

MikeArmstrong
5-Regular Member
(To:ptc-3134225)

Deepak Somasundaram wrote:

Hello all,

But since the files where created by different people, there are few common variable names in these two files so they are overwritten. Is there an option in Mathcad where we can send and receive just few variables from other mathcad file??

Thanks in advance

Deepak

If the variable names you actually want to cross reference are different then I think it would be possible.

Variable names what needs to be cross refered and few other variable names are same.

MikeArmstrong
5-Regular Member
(To:ptc-3134225)

Can you provide an example or the actual worksheets for us to have a look at?

Announcements

Top Tags