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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Directory in programme

FC_10037391
9-Granite

Directory in programme

How to determine the directory to which the program is written so that I can read from that directory explicitly 

2 REPLIES 2
StuartBruff
23-Emerald III
(To:FC_10037391)


@FC_10037391 wrote:

How to determine the directory to which the program is written so that I can read from that directory explicitly 


Try using the built-in variable CWD (current working directory) - it should work for many purposes.

 

StuartBruff_0-1643649297144.png

 

However, it is not guaranteed to do so.   I'm not sure if it's possible to find out this information by using the Mathcad API to, say, write a user-defined function that will determine this.

 

Stuart

I use CWD whenever I'm writing an output file or reading an input file that is stored in the same directory. It's also useful in the footer for when you're printing a PDF version of the calcs for a client and will one day want to refer back to the original file. 

Announcements

Top Tags