Skip to main content
8-Gravel
Sep 27, 2021 10:49 PM UTC
Question

Include worksheet string as variable

Can I pass string variable into the include statement to based on file path as a string variable? Can it be done 

5 replies

ttokoro
21-Topaz I
Sep 27, 2021 11:30 PM UTC

image.png

system command to show the current working directory.

Translate
t.t.
8-Gravel
Sep 27, 2021 11:39 PM UTC

Thanks for your response I have an understanding of CWD command.  I’m looking for a way to pass a string variable into the include statement to include a MathCad file based off of the file path stored as a string variable. Is there a way to do this?

Is there a way to make ssmith as a variable  that is in include path?

Translate
23-Emerald V
Sep 28, 2021 9:30 AM UTC

@SS_9781956 wrote:

Thanks for your response I have an understanding of CWD command.  I’m looking for a way to pass a string variable into the include statement to include a MathCad file based off of the file path stored as a string variable. Is there a way to do this?

Is there a way to make ssmith as a variable  that is in include path?


If you (or your local neighbourhood tame programmer) are up for some programming in a different language in a different environment, then you could see if the Mathcad API would support you in writing a function that inserts a reference.  

 

I've had a quick scan of the API but couldn't see anything, but that's not to say it's not there (I haven't written a Mathcad interface in over a decade).   If you're a support customer, then it might be worth asking the question of PTC.

 

I suppose there's always something like https://www.autohotkey.com/, which might be combinable with a Mathcad DLL.

 

Cheers,

 

Stuart

Translate
terryhendicott
21-Topaz II
Sep 28, 2021 12:02 AM UTC

Hi,

Hate to be the bearer of bad news.

The answer is no, but it would be a great feature to ask for.

Cheers

Terry

Translate
12-Amethyst
Aug 28, 2024 6:14 PM UTC

This is needed to grow the API

Translate