Skip to main content
1-Visitor
December 9, 2019
Solved

Using CWD variable to reference worksheet

  • December 9, 2019
  • 2 replies
  • 3803 views

Hi,

 

Is it possible to use the CWD variable to reference worksheets? Meaning instead of clicking on the 'Include <<' button and choosing the referenced worksheet file, to write something like: "CWD\Reference.mcdx" in the field next to the Include << button. I'm using Mathcad Prime 6.0.

 

Thanks in advance.

 

Best answer by LucMeekes

If all you're trying to do is to include a (reference) worksheet in the same directory as where the (referencing) Mathcad worksheet itself is saved/located, then you can reference a reference worksheet named 'reference.mcdx' by '.\reference.mcdx'.

In (real) Mathcad, when specifying a reference worksheet you can tick an option to use a relative path, which has the same effect. I don't know if Prime has that option, I'm limited to Express.

Of course, if you are changing the CWD variable within your sheet, the above is not an option for you.

 

Success!
Luc

2 replies

21-Topaz II
December 9, 2019

Hi,

Use

 

concat(CWD,"Reference.mcdx")

 

Cheers

Terry

 

DaniBoy1-VisitorAuthor
1-Visitor
December 9, 2019

Nice try. Unfortuantely it looks like the include reference function does not accept ascii string. Also I found this other thread, saying that there is no solution for this issue:

https://community.ptc.com/t5/PTC-Mathcad/Insert-gt-Reference-using-a-Variable/m-p/353759

 

23-Emerald I
December 9, 2019

FredKohlhepp_0-1575897835832.png

 

LucMeekes23-Emerald IVAnswer
23-Emerald IV
December 10, 2019

If all you're trying to do is to include a (reference) worksheet in the same directory as where the (referencing) Mathcad worksheet itself is saved/located, then you can reference a reference worksheet named 'reference.mcdx' by '.\reference.mcdx'.

In (real) Mathcad, when specifying a reference worksheet you can tick an option to use a relative path, which has the same effect. I don't know if Prime has that option, I'm limited to Express.

Of course, if you are changing the CWD variable within your sheet, the above is not an option for you.

 

Success!
Luc