Skip to main content
1-Visitor
April 26, 2016
Question

How to put the mathcad worksheet name into a variable of the worksheet?

  • April 26, 2016
  • 5 replies
  • 2545 views

To organize my Mathcad prime 3.1 solutions, I need to get the filename as a string inside the worksheet itself. How can I get this?

5 replies

25-Diamond I
April 26, 2016

There is a built-in variable CWD which contains the current working directory as a string, but unfortunately there is no variable containing the filename,

As we don't have scripted components in Prime like we are used from Mathcad (15 and below), I guess you are out of luck.

24-Ruby IV
April 26, 2016

I have searched this function in help. But Werner is the best help

23-Emerald V
April 26, 2016

Peter Klemm wrote:

To organize my Mathcad prime 3.1 solutions, I need to get the filename as a string inside the worksheet itself. How can I get this?

I'm not sure there's a direct way in Prime 3.1 (there is in M15 using components).  It may be that you have write a function using the Mathcad Prime API (or get someone to do it for you ... I don't know anything about external comms with Mathcad Prime, but I suspect you'll need C or C++ to make a standalone function that you can then call from within Mathcad)..

Stuart

pklemm-21-VisitorAuthor
1-Visitor
April 26, 2016

Interesting. I have written some external C# Applications to communicate with prime3.1. That works well but I have no idea how to extend prime with functions.

Anyone there who can give me a hint?

19-Tanzanite
April 26, 2016

Look in the help: there is a chapter "Custom Functions" that describes how to create your own function using C.