You should be able to use GetUserFilesDirectory() which works at the workbench level. You should be able to call that function from Mechanical by importing wbjn as explained in the above help link.
How to access Ansys Online Help Document
How to show full resolution image
Guidelines on the Student Community
How to use Google to search within Ansys Student Community
Please Login to Report Topic
Please Login to Share Feed