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

undefined variable issue of reference file

Highlighted
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
Highlighted

Re: undefined variable issue of reference file

Can you post the files?

Highlighted

Re: undefined variable issue of reference file

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

Highlighted

Re: undefined variable issue of reference file

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

 

Luc

Highlighted

Re: undefined variable issue of reference file

yes,I have a few global vars in processing file
Highlighted

Re: undefined variable issue of reference file

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

Highlighted

Re: undefined variable issue of reference file

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

Highlighted

Re: undefined variable issue of reference file

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.

Highlighted

Re: undefined variable issue of reference file

Why do you use global vars?

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

Highlighted

Re: undefined variable issue of reference file

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

Re: undefined variable issue of reference file


@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!

Highlighted

Re: undefined variable issue of reference file

One more!

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

Highlighted

Re: undefined variable issue of reference file

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

Re: undefined variable issue of reference file

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

Highlighted

Re: undefined variable issue of reference file

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.

 

Announcements