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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

undefined variable issue of reference file

ifomenko
15-Moonstone

undefined variable issue of reference file

Hi

MathCAD 15, I use references a lot with success but yesterday I met some bug for the first time.

My file became big and I decided to split it into two parts - processing and postprocessing.

I created a new postprocessing file and insert processing file as a reference at the beginning of it.

I post-process (output) variables of processing file and meet several variables which are not defined.

I checked them at the end of processing file - they are defined.

Has anybody had the same problem with references?

 

14 REPLIES 14
LucMeekes
23-Emerald III
(To:ifomenko)

Can you post the files?

ifomenko
15-Moonstone
(To:LucMeekes)

 Unfortunately, I can`t (: I can try to simplify them (delete some parts that outside of undefined variable) but what it gives me?

LucMeekes
23-Emerald III
(To:ifomenko)

Just a guess (in the dark): Do you use global variable and/or function definitions?

 

Luc

ifomenko
15-Moonstone
(To:LucMeekes)

yes,I have a few global vars in processing file
LucMeekes
23-Emerald III
(To:ifomenko)

Are they in any way connected to the undefined ones that Mathcad is complaining about?

What if you put them as ordinary definitions in the postprocess sheet, just above where you call the preprocess sheet... (Or do you use a top sheet that first calls the preprocess, then the postprocess)?

 

Success!
Luc

ifomenko
15-Moonstone
(To:LucMeekes)

Thanks, Luk, I`ll try to change something with my global vars to check your idea, but only tomorrow.

ifomenko
15-Moonstone
(To:ifomenko)

Hi Luk

I`ve just checked your idea on a very simple test file. Everything works well. So, there is another reason for my issue (:.

Thank you in any case.

Why do you use global vars?

I do not know one sheet where we cannot do someone without its?

I can work without them but Im not sure that they are the problem.


@ifomenko wrote:
I can work without them but Im not sure that they are the problem.

If can - do it! And see - do you have the problem or not!

One more!

Insert in the Mathcad sheet not a reference but the second sheet itself (in collapsed area). Ans check errors!

As I already wrote, everything is OK in case of one whole file.

May be you have variables with same names in both sheets?

-MFra-
21-Topaz II
(To:ifomenko)

Hi, 

 have you fulfilled the following rules?

About references.jpg

furthermore there must be no redefinition of functions, variables and constants in each worksheet.

Create daily copies of the main worksheet and possibly of the other files as well.

 

Top Tags